diff options
author | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2015-12-05 19:09:15 +0100 |
---|---|---|
committer | Oliver Wolff <oliver.wolff@theqtcompany.com> | 2015-12-08 06:37:57 +0000 |
commit | cbb2ce0f918c471a7306a2e6a91730aad6a01f7b (patch) | |
tree | 99f63b4aa010fe40c14d0ec292218370dcb0b8d9 /tools/shared/windows/registry.cpp | |
parent | 3304ea8f0e915b6562d9d89621c42a46bf92dafa (diff) |
Remove Wow6432Node versions of Visual Studio registry keys
The Visual Studio registry keys are stored in the 32 bit view.
Extend qt_readRegistryKey with an option that enables the caller to
choose the 32 bit or 64 bit registry view.
We now read the Visual Studio registry keys from the 32 bit registry
view even in a 64 bit build.
Adding the next Visual Studio version will become a bit easier.
Change-Id: I7300b992be6058f30a422e3f1fe0bafade6eea54
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'tools/shared/windows/registry.cpp')
-rw-r--r-- | tools/shared/windows/registry.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/shared/windows/registry.cpp b/tools/shared/windows/registry.cpp index c989ae279b..432c707e28 100644 --- a/tools/shared/windows/registry.cpp +++ b/tools/shared/windows/registry.cpp @@ -74,7 +74,7 @@ static QString keyName(const QString &rKey) } #endif -QString qt_readRegistryKey(HKEY parentHandle, const QString &rSubkey) +QString qt_readRegistryKey(HKEY parentHandle, const QString &rSubkey, unsigned long options) { QString result; @@ -83,7 +83,8 @@ QString qt_readRegistryKey(HKEY parentHandle, const QString &rSubkey) QString rSubkeyPath = keyPath(rSubkey); HKEY handle = 0; - LONG res = RegOpenKeyEx(parentHandle, (wchar_t*)rSubkeyPath.utf16(), 0, KEY_READ, &handle); + LONG res = RegOpenKeyEx(parentHandle, (wchar_t*)rSubkeyPath.utf16(), 0, + KEY_READ | options, &handle); if (res != ERROR_SUCCESS) return QString(); @@ -152,6 +153,7 @@ QString qt_readRegistryKey(HKEY parentHandle, const QString &rSubkey) #else Q_UNUSED(parentHandle); Q_UNUSED(rSubkey) + Q_UNUSED(options); #endif return result; |