diff options
author | MÃ¥rten Nordheim <marten.nordheim@qt.io> | 2021-10-22 13:27:22 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-10-24 10:23:52 +0000 |
commit | 6b24643199d0c63697784e27d67b5aef2ad97c12 (patch) | |
tree | 2934a705cfec8afaf57c523be1b1bd6337d2b8da /src | |
parent | af2d7949a9de3226bb08d74b700d18d19d24694b (diff) |
Update windows version detection
Since the API still doesn't return 11.
Change-Id: Ifd4f7f845915702fcbb0f857487358ae8e806273
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 06d2a5cf61ddc6095754a88f6e51153cb29e7134)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/global/qglobal.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 7fc197e0c5..9c546d87a4 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -2264,7 +2264,17 @@ static const char *osVer_helper(QOperatingSystemVersion version = QOperatingSyst case Q_WINVER(6, 3): return workstation ? "8.1" : "Server 2012 R2"; case Q_WINVER(10, 0): - return workstation ? "10" : "Server 2016"; + if (workstation) { + if (osver.dwBuildNumber >= 22000) + return "11"; + return "10"; + } + // else: Server + if (osver.dwBuildNumber >= 20348) + return "Server 2022"; + if (osver.dwBuildNumber >= 17763) + return "Server 2019"; + return "Server 2016"; } #undef Q_WINVER // unknown, future version |