summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qoperatingsystemversion_win.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QOperatingSystemVersion: Make implementation consistent on all platformsYuhang Zhao2022-01-121-10/+7
| | | | | | | | | | | | | Only Windows is using lambda function, change to static member function to be consistent with other platforms. QOperatingSystemVersionBase::current()'s implementation is exactly the same on all platforms, so move it to the common source file instead of implementing it three times on each platform. Change-Id: I4099235b3b041a9a374e21d537649047ee03e62b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QOperatingSystemVersion_win: Allow override as Windows 11Yuhang Zhao2022-01-071-2/+7
| | | | | | | And added some later Windows Server versions. Change-Id: I81415f1044d11458a4b4d19b01ce90e357f9d111 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Teach QOperatingSystemVersion to handle new OS entries in patch releasesMårten Nordheim2021-11-121-3/+3
| | | | | | | | | | | | | | 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>
* qoperatingsystemversion_win: fix thread raceMårten Nordheim2021-11-081-3/+4
| | | | | | | | | | | | If two threads call the function at the same time before the static is initialized one of them may end up with a half-written object. Amends 3fe89eec61e2c819bb54a5d3dfe4bc29dba49ff3 Pick-to: 6.2 Change-Id: Ie08970f9ee283fd75292a8b44a1fca89de4b04eb Reviewed-by: Yuhang Zhao <2546789017@qq.com> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* qoperatingsystemversion_win: cache the retrieved versionYuhang Zhao2021-11-021-6/+8
| | | | | | | | | | Make it a static variable to avoid acquiring the system version multiple times. The system version won't change at runtime after all. Pick-to: 6.2 Change-Id: Ic381e5dd7b482fedc9c01242482559ffca9d3f2b Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Remove pre-Win10 code paths in QtBaseYuhang Zhao2021-11-021-5/+2
| | | | | | | | | | | | | | Mostly a removal of dynamically loaded API. They should all exist on Windows 10 1809 (Qt6's minimum supported version). accessibility parts left untouched to make sure MinGW still compiles. Task-number: QTBUG-84432 Pick-to: 6.2 Change-Id: I7a091fc967bd6b9d18ac2de39db16e3b4b9a76ea Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* Remove Windows 7, 8, and 8.1 codepathsOliver Wolff2021-07-301-14/+2
| | | | | | | Pick-to: 6.2 Task-number: QTBUG-84432 Change-Id: I970d7d7e9ebdcf246a5be32d60066b4e5e948c27 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Remove winrtOliver Wolff2020-06-061-33/+0
| | | | | | | | | Macros and the await helper function from qfunctions_winrt(_p).h are needed in other Qt modules which use UWP APIs on desktop windows. Task-number: QTBUG-84434 Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove usages of Q_OS_WINCEJoerg Bornemann2019-05-231-4/+0
| | | | | | | | | | | This platform is history. Change-Id: Iddfab008a509f4828c321730414c8204055cf7af Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Windows code: Fix clang-tidy warnings about C-style castsFriedemann Kleint2018-08-301-1/+1
| | | | | | | | | | | Replace by reinterpret_cast or const_cast, respectively. Use auto when initializing a variable to fix Clang warnings about repeating the type name, do minor tidying along the way, and a few conversions of 0 or NULL to nullptr. Change-Id: Ieb271a87ddcf064f536e1ff05d23b1e688b1b56a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtCore/QtNetwork/QTestlib: Fix build with MinGW/g++ 8.1 x64Friedemann Kleint2018-06-251-1/+1
| | | | | | | | | | | | | | Fix warnings about invalid function type casts (return types conflicting with the FARPROC returned by GetProcAddress()) like: corelib\global\qoperatingsystemversion_win.cpp:100:48: error: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'RtlGetVersionFunction' {aka 'long int (*)(_OSVERSIONINFOW*)'} [-Werror=cast-function-type] io\qlockfile_win.cpp:158:85: error: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'GetModuleFileNameExFunc' {aka 'long unsigned int (*)(void*, HINSTANCE__*, wchar_t*, long unsigned int)'} [-Werror=cast-function-type] by introducing nested casts. Task-number: QTBUG-68742 Task-number: QTQAINFRA-2095 Change-Id: I3a5d2ea901bf5dc35963c589d61cf3dc7393377a Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Add a "shim" to allow use of Clang 5's __builtin_available everywhereJake Petroules2017-12-081-0/+3
| | | | | | | | | | | This is mostly relevant for Apple platforms, where we can use the new unguarded availability warnings to guarantee that proper version checks are present when using APIs that are not necessarily available on the deployment target. Change-Id: Ie408704b2924e1220491a9ea30f0141dfa4867d9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry-picked from 70422449ef892d7cc3086d88e5e9e43c771e2bc3)
* Long live QOperatingSystemVersion!Jake Petroules2016-09-181-0/+171
This class provides a "type safe" way to compare and access operating system version numbers. [ChangeLog][Deprecation Notice] QSysInfo::windowsVersion() and QSysInfo::macVersion() are deprecated and are replaced by the newly introduced QOperatingSystemVersion. Change-Id: I52b532de2e068ccf90faaa8342eee90c0a4145de Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>