summaryrefslogtreecommitdiffstats
path: root/src/core/api/qwebenginescript.cpp
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2025-01-22 17:32:52 +0100
committerPeter Varga <pvarga@inf.u-szeged.hu>2025-02-08 15:54:40 +0000
commit900ae370f5d6c06a29b08fd94523d30bdc089b88 (patch)
treeb81f0be056457ce16882a47dcd2d0669f930150a /src/core/api/qwebenginescript.cpp
parentc5cec767d915e3845b5d50ad950b278e1b43b1d4 (diff)
Unify and modernize Latin1 string literals
- Fix some deprecated string literal compiler warnings - Replace deprecated QLatin1String usages - Use QLatin1StringView where QString conversion is not needed - Replace QLatin1StringView usages with shorter _L1 suffix Pick-to: 6.8 6.9 Change-Id: I8adb6dcd06ac5dfc248d39455c14a26957876512 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/core/api/qwebenginescript.cpp')
-rw-r--r--src/core/api/qwebenginescript.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/api/qwebenginescript.cpp b/src/core/api/qwebenginescript.cpp
index 846b01196..8d1ff46bf 100644
--- a/src/core/api/qwebenginescript.cpp
+++ b/src/core/api/qwebenginescript.cpp
@@ -7,6 +7,7 @@
#include <QtCore/QDebug>
#include <QtCore/QFile>
+using namespace Qt::StringLiterals;
using QtWebEngineCore::UserScript;
QT_BEGIN_NAMESPACE
@@ -161,7 +162,7 @@ void QWebEngineScript::setSourceUrl(const QUrl &url)
QFile file;
if (url.isLocalFile()) {
file.setFileName(url.toLocalFile());
- } else if (url.scheme().compare(QLatin1String("qrc"), Qt::CaseInsensitive) == 0) {
+ } else if (url.scheme().compare("qrc"_L1, Qt::CaseInsensitive) == 0) {
if (url.authority().isEmpty())
file.setFileName(QLatin1Char(':') + url.path());
}