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 /src/imports | |
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 'src/imports')
-rw-r--r-- | src/imports/wavefrontmesh/qwavefrontmesh.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/imports/wavefrontmesh/qwavefrontmesh.cpp b/src/imports/wavefrontmesh/qwavefrontmesh.cpp index 1772c40c50..5d1affbdab 100644 --- a/src/imports/wavefrontmesh/qwavefrontmesh.cpp +++ b/src/imports/wavefrontmesh/qwavefrontmesh.cpp @@ -257,7 +257,7 @@ void QWavefrontMesh::readData() while (!stream.atEnd()) { stream.readLineInto(&buffer); - QVector<QStringRef> tokens = buffer.splitRef(space, Qt::SkipEmptyParts); + auto tokens = QStringView{buffer}.split(space, Qt::SkipEmptyParts); if (tokens.size() < 2) continue; @@ -316,7 +316,7 @@ void QWavefrontMesh::readData() if (tokens.size() >= 4 && tokens.size() <= 5) { { bool ok; - QVector<QStringRef> faceTokens = tokens.at(1).split(slash, Qt::SkipEmptyParts); + auto faceTokens = tokens.at(1).split(slash, Qt::SkipEmptyParts); Q_ASSERT(!faceTokens.isEmpty()); p1 = faceTokens.at(0).toInt(&ok) - 1; @@ -336,7 +336,7 @@ void QWavefrontMesh::readData() { bool ok; - QVector<QStringRef> faceTokens = tokens.at(2).split(slash, Qt::SkipEmptyParts); + auto faceTokens = tokens.at(2).split(slash, Qt::SkipEmptyParts); Q_ASSERT(!faceTokens.isEmpty()); p2 = faceTokens.at(0).toInt(&ok) - 1; @@ -356,7 +356,7 @@ void QWavefrontMesh::readData() { bool ok; - QVector<QStringRef> faceTokens = tokens.at(3).split(slash, Qt::SkipEmptyParts); + auto faceTokens = tokens.at(3).split(slash, Qt::SkipEmptyParts); Q_ASSERT(!faceTokens.isEmpty()); p3 = faceTokens.at(0).toInt(&ok) - 1; @@ -394,7 +394,7 @@ void QWavefrontMesh::readData() if (tokens.size() == 5) { bool ok; - QVector<QStringRef> faceTokens = tokens.at(4).split(slash, Qt::SkipEmptyParts); + auto faceTokens = tokens.at(4).split(slash, Qt::SkipEmptyParts); Q_ASSERT(!faceTokens.isEmpty()); int p4 = faceTokens.at(0).toInt(&ok) - 1; |