summaryrefslogtreecommitdiffstats
path: root/src/corelib/mimetypes/qmimemagicrule.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-05-22 17:08:38 +0200
committerLars Knoll <lars.knoll@qt.io>2020-06-11 02:50:49 +0200
commit82a0f4a193367fc661c95a832fbec74f8e9a76d1 (patch)
tree7cc989e8f9c55f782ac67c2f40f944aff1d8ab77 /src/corelib/mimetypes/qmimemagicrule.cpp
parentecacb3c62f94d2b671a252aa177264f41f6869ea (diff)
Port mimetypes away from QStringRef
Task-number: QTBUG-84319 Change-Id: I2bed1149df7f11495fd9dc3577828c0790b17dab Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/corelib/mimetypes/qmimemagicrule.cpp')
-rw-r--r--src/corelib/mimetypes/qmimemagicrule.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/mimetypes/qmimemagicrule.cpp b/src/corelib/mimetypes/qmimemagicrule.cpp
index a97fe5bdc4..2c8c2e7199 100644
--- a/src/corelib/mimetypes/qmimemagicrule.cpp
+++ b/src/corelib/mimetypes/qmimemagicrule.cpp
@@ -236,8 +236,8 @@ QMimeMagicRule::QMimeMagicRule(const QString &type,
// Parse for offset as "1" or "1:10"
const int colonIndex = offsets.indexOf(QLatin1Char(':'));
- const QStringRef startPosStr = offsets.midRef(0, colonIndex); // \ These decay to returning 'offsets'
- const QStringRef endPosStr = offsets.midRef(colonIndex + 1);// / unchanged when colonIndex == -1
+ const QStringView startPosStr = QStringView{offsets}.mid(0, colonIndex); // \ These decay to returning 'offsets'
+ const QStringView endPosStr = QStringView{offsets}.mid(colonIndex + 1);// / unchanged when colonIndex == -1
if (Q_UNLIKELY(!QMimeTypeParserBase::parseNumber(startPosStr, &m_startPos, errorString)) ||
Q_UNLIKELY(!QMimeTypeParserBase::parseNumber(endPosStr, &m_endPos, errorString))) {
m_type = Invalid;