From 7d79b94db7debdd1896d1912e3052d5950b05df5 Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Mon, 25 Apr 2022 16:16:10 +0200 Subject: QtWidgets: use _L1 for for creating Latin-1 string literals Task-number: QTBUG-98434 Change-Id: I310ea8f19d73a79d985ebfb8bfbff7a02c424360 Reviewed-by: Volker Hilsheimer --- src/widgets/widgets/qlabel.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/widgets/widgets/qlabel.cpp') diff --git a/src/widgets/widgets/qlabel.cpp b/src/widgets/widgets/qlabel.cpp index 55cf8c0b41..9586151f0d 100644 --- a/src/widgets/widgets/qlabel.cpp +++ b/src/widgets/widgets/qlabel.cpp @@ -60,6 +60,8 @@ QT_BEGIN_NAMESPACE +using namespace Qt::StringLiterals; + QLabelPrivate::QLabelPrivate() : QFramePrivate(), sh(), @@ -1555,11 +1557,11 @@ void QLabelPrivate::ensureTextPopulated() const int from = 0; bool found = false; QTextCursor cursor; - while (!(cursor = control->document()->find((QLatin1String("&")), from)).isNull()) { + while (!(cursor = control->document()->find(("&"_L1), from)).isNull()) { cursor.deleteChar(); // remove the ampersand cursor.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor); from = cursor.position(); - if (!found && cursor.selectedText() != QLatin1String("&")) { //not a second & + if (!found && cursor.selectedText() != "&"_L1) { //not a second & found = true; shortcutCursor = cursor; } -- cgit v1.2.3