From 3446313c7a5cd6005089866a7b20c9f28e132a0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Mon, 25 Oct 2021 12:47:07 +0200 Subject: 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 --- src/corelib/global/qoperatingsystemversion_win.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/corelib/global/qoperatingsystemversion_win.cpp') 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; -- cgit v1.2.3