Commit 7eb2ceed authored by Andrius Štikonas's avatar Andrius Štikonas
Browse files

Port QStringRef to QStringView.

parent b0cd5def
Pipeline #124098 passed with stage
in 59 seconds
......@@ -8,6 +8,7 @@
#include <QString>
#include <QStringList>
#include <QStringView>
const static QString requiredPartition = QStringLiteral("RequiredPartition");
const static QString noBlockIoProtocol = QStringLiteral("NoBlockIOProtocol");
......@@ -25,7 +26,7 @@ quint64 SfdiskGptAttributes::toULongLong(const QStringList& attrs)
else if (attr.compare(legacyBiosBootable) == 0)
attributes |= 0x4ULL;
else if (attr.startsWith(guid))
attributes |= 1ULL << QStringRef(&attr, guid.length(), attr.length() - guid.length()).toULongLong();
attributes |= 1ULL << QStringView{ attr }.mid(guid.length(), attr.length() - guid.length()).toULongLong();
return attributes;
}
......
......@@ -8,8 +8,7 @@
#define SFDISKGPTATTRIBUTES__H
#include <QtGlobal>
class QStringList;
#include <QStringList>
/** Sfdisk GPT Attributes helpers.
@author Gaël PORTAY <gael.portay@collabora.com>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment