summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjörn Schäpers <bjoern@hazardy.de>2023-05-10 21:42:59 +0200
committerBjörn Schäpers <qt-codereview@hazardy.de>2023-05-12 19:45:44 +0000
commit7327a3bbc27566a4431c9b2d54df6f9158b6c593 (patch)
tree94ca6e45038050e99a5324382f211911388954c6 /src
parentc06d291b11a152f5bc3bd117928561b912900e51 (diff)
downloadqt-creator-7327a3bbc27566a4431c9b2d54df6f9158b6c593.tar.gz
Registryaccess: Fix defined but not used warning
In file included from .../src/plugins/debugger/registerpostmortemaction.cpp:6: .../src/shared/registryaccess/registryaccess.h:26:21: warning: 'RegistryAccess::autoRegistryValueNameC' defined but not used [-Wunused-variable] 26 | static const WCHAR *autoRegistryValueNameC = L"Auto"; I don't think using static in a header is a nice thing, inline would work, but we have constexpr which implies inline. Change-Id: I7b872e65a554a9a9feb39845717c5dba7ba6777c Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/shared/registryaccess/registryaccess.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/shared/registryaccess/registryaccess.h b/src/shared/registryaccess/registryaccess.h
index 21862ae4a1..b4e0c08958 100644
--- a/src/shared/registryaccess/registryaccess.h
+++ b/src/shared/registryaccess/registryaccess.h
@@ -20,10 +20,11 @@ enum AccessMode {
Registry64Mode = 0x4 // Corresponds to QSettings::Registry64Format (5.7)
};
-static const char *debuggerApplicationFileC = "qtcdebugger";
-static const WCHAR *debuggerRegistryKeyC = L"Software\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug";
-static const WCHAR *debuggerRegistryValueNameC = L"Debugger";
-static const WCHAR *autoRegistryValueNameC = L"Auto";
+constexpr const char debuggerApplicationFileC[] = "qtcdebugger";
+constexpr const WCHAR debuggerRegistryKeyC[]
+ = L"Software\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug";
+constexpr const WCHAR debuggerRegistryValueNameC[] = L"Debugger";
+constexpr const WCHAR autoRegistryValueNameC[] = L"Auto";
static inline QString wCharToQString(const WCHAR *w)
{