diff options
author | Karsten Heimrich <karsten.heimrich@qt.io> | 2020-06-16 10:23:19 +0200 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@qt.io> | 2020-06-16 22:46:16 +0200 |
commit | 1b10ce6a08edbc2ac7e8fd7e97e3fc691f2081df (patch) | |
tree | 34ab485d1dd9435369709b5e77c11af6dec78c22 /tools/qmlprofiler | |
parent | b65eee039092fa664e781cdd98a4bb5e66815218 (diff) |
Port QtDeclarative from QStringRef to QStringView
Task-number: QTBUG-84319
Change-Id: I2dcfb8a2db98282c7a1acdad1e6f4f949f26df15
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'tools/qmlprofiler')
-rw-r--r-- | tools/qmlprofiler/qmlprofilerapplication.cpp | 2 | ||||
-rw-r--r-- | tools/qmlprofiler/qmlprofilerdata.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/qmlprofiler/qmlprofilerapplication.cpp b/tools/qmlprofiler/qmlprofilerapplication.cpp index 7c92f428ae..d91ef191e5 100644 --- a/tools/qmlprofiler/qmlprofilerapplication.cpp +++ b/tools/qmlprofiler/qmlprofilerapplication.cpp @@ -354,7 +354,7 @@ bool QmlProfilerApplication::checkOutputFile(PendingRequest pending) void QmlProfilerApplication::userCommand(const QString &command) { - auto args = command.splitRef(QChar::Space, Qt::SkipEmptyParts); + auto args = QStringView{command}.split(QChar::Space, Qt::SkipEmptyParts); if (args.isEmpty()) { prompt(); return; diff --git a/tools/qmlprofiler/qmlprofilerdata.cpp b/tools/qmlprofiler/qmlprofilerdata.cpp index 9ec143975e..8803170ff2 100644 --- a/tools/qmlprofiler/qmlprofilerdata.cpp +++ b/tools/qmlprofiler/qmlprofilerdata.cpp @@ -198,7 +198,7 @@ void QmlProfilerData::addEventType(const QQmlProfilerEventType &type) break; case PixmapCacheEvent: { const QString filePath = QUrl(type.location().filename()).path(); - displayName = filePath.midRef(filePath.lastIndexOf(QLatin1Char('/')) + 1) + displayName = QStringView{filePath}.mid(filePath.lastIndexOf(QLatin1Char('/')) + 1) + QLatin1Char(':') + QString::number(type.detailType()); break; } @@ -218,7 +218,7 @@ void QmlProfilerData::addEventType(const QQmlProfilerEventType &type) displayName = QString::fromLatin1("Unknown"); } else { const QString filePath = QUrl(eventLocation.filename()).path(); - displayName = filePath.midRef( + displayName = QStringView{filePath}.mid( filePath.lastIndexOf(QLatin1Char('/')) + 1) + QLatin1Char(':') + QString::number(eventLocation.line()); } |