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/qmleasing/splineeditor.cpp | |
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/qmleasing/splineeditor.cpp')
-rw-r--r-- | tools/qmleasing/splineeditor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/qmleasing/splineeditor.cpp b/tools/qmleasing/splineeditor.cpp index 1426a1e107..99c161d475 100644 --- a/tools/qmleasing/splineeditor.cpp +++ b/tools/qmleasing/splineeditor.cpp @@ -675,12 +675,12 @@ void SplineEditor::setEasingCurve(const QString &code) if (m_block) return; if (code.startsWith(QLatin1Char('[')) && code.endsWith(QLatin1Char(']'))) { - const QStringRef cleanCode(&code, 1, code.size() - 2); + const auto cleanCode = QStringView(code).mid(1, code.size() - 2); const auto stringList = cleanCode.split(QLatin1Char(','), Qt::SkipEmptyParts); if (stringList.count() >= 6 && (stringList.count() % 6 == 0)) { QVector<qreal> realList; realList.reserve(stringList.count()); - for (const QStringRef &string : stringList) { + for (const QStringView &string : stringList) { bool ok; realList.append(string.toDouble(&ok)); if (!ok) |