From ceaa7d6341e666f6fe0d071ea34cad9877961a0e Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Wed, 13 Apr 2022 11:42:38 +0200 Subject: Plugins: use _L1 for for creating Latin-1 string literals As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Task-number: QTBUG-98434 Change-Id: I7fadd3cf27ad099028d70f05956303e3af62c0f5 Reviewed-by: Marc Mutz --- src/plugins/platforms/windows/qwindowscontext.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/plugins/platforms/windows/qwindowscontext.cpp') diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index 721e6a4929..efbc410e05 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -94,6 +94,8 @@ QT_BEGIN_NAMESPACE +using namespace Qt::StringLiterals; + Q_LOGGING_CATEGORY(lcQpaWindows, "qt.qpa.windows") Q_LOGGING_CATEGORY(lcQpaEvents, "qt.qpa.events") Q_LOGGING_CATEGORY(lcQpaGl, "qt.qpa.gl") @@ -544,28 +546,28 @@ QString QWindowsContext::registerWindowClass(const QWindow *w) } // Create a unique name for the flag combination QString cname = classNamePrefix(); - cname += QLatin1String("QWindow"); + cname += "QWindow"_L1; switch (type) { case Qt::Tool: - cname += QLatin1String("Tool"); + cname += "Tool"_L1; break; case Qt::ToolTip: - cname += QLatin1String("ToolTip"); + cname += "ToolTip"_L1; break; case Qt::Popup: - cname += QLatin1String("Popup"); + cname += "Popup"_L1; break; default: break; } if (style & CS_DROPSHADOW) - cname += QLatin1String("DropShadow"); + cname += "DropShadow"_L1; if (style & CS_SAVEBITS) - cname += QLatin1String("SaveBits"); + cname += "SaveBits"_L1; if (style & CS_OWNDC) - cname += QLatin1String("OwnDC"); + cname += "OwnDC"_L1; if (icon) - cname += QLatin1String("Icon"); + cname += "Icon"_L1; return registerWindowClass(cname, qWindowsWndProc, style, GetSysColorBrush(COLOR_WINDOW), icon); } -- cgit v1.2.3