diff options
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 |