summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qoperatingsystemversion_win.cpp
diff options
context:
space:
mode:
authorMårten Nordheim <marten.nordheim@qt.io>2021-10-25 12:47:07 +0200
committerMårten Nordheim <marten.nordheim@qt.io>2021-11-12 18:06:44 +0100
commit3446313c7a5cd6005089866a7b20c9f28e132a0a (patch)
tree478c27abde94592fa5777440072bbb44413b69e7 /src/corelib/global/qoperatingsystemversion_win.cpp
parent0b70d698c8ad314f5bbf4a13914293aefe7d200f (diff)
Teach QOperatingSystemVersion to handle new OS entries in patch releases
Adding new entries to QOperatingSystemVersion in patch releases was previously breaking our BC guarantees because the entries are exported, thus users cannot freely switch between different patch-releases without a recompile if they adopted the new entries. Move the data itself to a base class so that the entries can be constructed inline. Task-number: QTBUG-97808 Change-Id: Ic44f07488af8a04a3bedc10bebb740c4d68f43f3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qoperatingsystemversion_win.cpp')
-rw-r--r--src/corelib/global/qoperatingsystemversion_win.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/global/qoperatingsystemversion_win.cpp b/src/corelib/global/qoperatingsystemversion_win.cpp
index c052cd9c9e..9dc8c96105 100644
--- a/src/corelib/global/qoperatingsystemversion_win.cpp
+++ b/src/corelib/global/qoperatingsystemversion_win.cpp
@@ -108,10 +108,10 @@ OSVERSIONINFOEX qWindowsVersionInfo()
return realResult;
}
-QOperatingSystemVersion QOperatingSystemVersion::current()
+QOperatingSystemVersionBase QOperatingSystemVersionBase::current()
{
- static QOperatingSystemVersion v = [](){
- QOperatingSystemVersion v;
+ static QOperatingSystemVersionBase v = [](){
+ QOperatingSystemVersionBase v;
v.m_os = currentType();
const OSVERSIONINFOEX osv = qWindowsVersionInfo();
v.m_major = osv.dwMajorVersion;