diff options
author | Fredrik Orderud <fredrik.orderud@ge.com> | 2020-05-05 13:59:27 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-05-07 16:39:39 +0200 |
commit | a8b373d678f44a9d7006a412cabc75e7586b2c43 (patch) | |
tree | c691bfc50f142f68314f1dae95d2a8ea18287627 | |
parent | 798492ccee75a841dfec0e669a409515f3462350 (diff) |
-rw-r--r-- | src/corelib/io/qstandardpaths_win.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/corelib/io/qstandardpaths_win.cpp b/src/corelib/io/qstandardpaths_win.cpp index 5055f4020c..cbe4ccd0b2 100644 --- a/src/corelib/io/qstandardpaths_win.cpp +++ b/src/corelib/io/qstandardpaths_win.cpp @@ -47,6 +47,7 @@ #include <qcoreapplication.h> #endif +#include <qoperatingsystemversion.h> #include <qt_windows.h> #include <shlobj.h> #include <intshcut.h> @@ -99,7 +100,11 @@ static bool isProcessLowIntegrity() { // Disable function until Qt CI is updated return false; #else - HANDLE process_token = GetCurrentProcessToken(); // non-leaking pseudo-handle + if (QOperatingSystemVersion::current() < QOperatingSystemVersion::Windows8) + return false; + // non-leaking pseudo-handle. Expanded inline function GetCurrentProcessToken() + // (was made an inline function in Windows 8). + const auto process_token = HANDLE(quintptr(-4)); QVarLengthArray<char,256> token_info_buf(256); auto* token_info = reinterpret_cast<TOKEN_MANDATORY_LABEL*>(token_info_buf.data()); |