diff options
author | Ivan Komissarov <abbapoh@gmail.com> | 2020-11-01 15:57:44 +0100 |
---|---|---|
committer | Ivan Komissarov <ABBAPOH@gmail.com> | 2020-11-09 10:25:00 +0000 |
commit | 8644a096bba1cef9a0dad75938f362d3ea367a89 (patch) | |
tree | e9b566143ee12464ecd63a4c1b4624db9379f99d /src/lib/corelib/language/asttools.cpp | |
parent | c1574c112d1a406d7c46c8ab1f459b6288bcc74e (diff) |
qt6: replace some QStringRefs with QStringViews
QStringRef does not exist anymore.
Qml parser is not ported yet.
Change-Id: Ifb99a529b69c0085363031e852ffd7576f1d93be
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/lib/corelib/language/asttools.cpp')
-rw-r--r-- | src/lib/corelib/language/asttools.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/corelib/language/asttools.cpp b/src/lib/corelib/language/asttools.cpp index 1b6abac7f..0d0c234c4 100644 --- a/src/lib/corelib/language/asttools.cpp +++ b/src/lib/corelib/language/asttools.cpp @@ -64,10 +64,10 @@ QString textOf(const QString &source, QbsQmlJS::AST::Node *node) int(node->lastSourceLocation().end() - node->firstSourceLocation().begin())); } -QStringRef textRefOf(const QString &source, QbsQmlJS::AST::Node *node) +QStringView textViewOf(const QString &source, QbsQmlJS::AST::Node *node) { const quint32 firstBegin = node->firstSourceLocation().begin(); - return source.midRef(firstBegin, int(node->lastSourceLocation().end() - firstBegin)); + return QStringView(source).mid(firstBegin, int(node->lastSourceLocation().end() - firstBegin)); } } // namespace Internal |