diff options
| author | Peter Varga <pvarga@inf.u-szeged.hu> | 2025-01-22 17:32:52 +0100 |
|---|---|---|
| committer | Peter Varga <pvarga@inf.u-szeged.hu> | 2025-02-08 15:54:40 +0000 |
| commit | 900ae370f5d6c06a29b08fd94523d30bdc089b88 (patch) | |
| tree | b81f0be056457ce16882a47dcd2d0669f930150a /src/core/profile_adapter.cpp | |
| parent | c5cec767d915e3845b5d50ad950b278e1b43b1d4 (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/profile_adapter.cpp')
| -rw-r--r-- | src/core/profile_adapter.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/profile_adapter.cpp b/src/core/profile_adapter.cpp index 8a7e491dc..4fa0f49b4 100644 --- a/src/core/profile_adapter.cpp +++ b/src/core/profile_adapter.cpp @@ -41,13 +41,16 @@ #include <QString> #include <QStandardPaths> +using namespace Qt::StringLiterals; + namespace { inline QString buildLocationFromStandardPath(const QString &standardPath, const QString &name) { - QString location = standardPath; + QString location; + location += standardPath; if (location.isEmpty()) - location = QDir::homePath() % QLatin1String("/.") % QCoreApplication::applicationName(); + location += QDir::homePath() % "/."_L1 % QCoreApplication::applicationName(); - location.append(QLatin1String("/QtWebEngine/") % name); + location += "/QtWebEngine/"_L1 % name; return location; } } @@ -324,7 +327,7 @@ QString ProfileAdapter::httpCachePath() const return QString(); QString basePath = cachePath(); if (!basePath.isEmpty()) - return basePath % QLatin1String("/Cache"); + return basePath % "/Cache"_L1; return QString(); } |
