From 308f80d172c5ba766feea4a55284970a779503d6 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Mon, 24 Jun 2024 14:17:46 +0200 Subject: [PATCH] TaskTree: Use QLatin1StringView for s_activeStorageWarning Change-Id: I7c58fa9e84227a5798359f22c53f3e69bf98dc9a Reviewed-by: hjk (cherry picked from commit 7c3db02ad3753a4dc6bb691588cf1e0b4a89514f) Reviewed-by: Qt Cherry-pick Bot --- src/assets/downloader/tasking/tasktree.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/assets/downloader/tasking/tasktree.cpp b/src/assets/downloader/tasking/tasktree.cpp index f1b4325e158..0e62ceef7f8 100644 --- a/src/assets/downloader/tasking/tasktree.cpp +++ b/src/assets/downloader/tasking/tasktree.cpp @@ -18,6 +18,7 @@ #include #include +using namespace Qt::StringLiterals; using namespace std::chrono; QT_BEGIN_NAMESPACE @@ -1291,11 +1292,11 @@ const void *Loop::valuePtr() const using StoragePtr = void *; -static QString s_activeStorageWarning = QString::fromLatin1( +constexpr QLatin1StringView s_activeStorageWarning = "The referenced storage is not reachable in the running tree. " "A nullptr will be returned which might lead to a crash in the calling code. " "It is possible that no storage was added to the tree, " - "or the storage is not reachable from where it is referenced."); + "or the storage is not reachable from where it is referenced."_L1; class StorageThreadData {