summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qoperatingsystemversion.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use official names for Android versionsVolker Hilsheimer2021-03-291-6/+6
| | | | | | | | | | | Google ditched the dessert names as of Android "Q". "Q" and "R" were development names, the released versions are called Android 10 and Android 11, respectively. Pick-to: 6.1 Task-number: QTBUG-90211 Change-Id: I36225067cc802ebd3ebd1289d509759ae1b2d83d Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Make QJniObject and QJniEnvironment public APIAssam Boudjelthia2021-01-271-4/+4
| | | | | | | | | | | | | | | | | | | | As part of Qt 6 restructring for the extras modules, this change exposes the Jni APIs which are very important for Android platform. This patch adds the APIs QJniObject, QJniEnvironment, QJniExceptionCleaner based from private QtCore and QtAndroidExtras. The Jni interface is cross-platform which justifies the name, but currently, this API is used mainly for Android, and the naming comes generic without Android keyword to avoid any future limitation on supporting other platforms. [ChangeLog][QtCore] Add new QJniObject, QJniEnvironment and QJniExceptionCleaner APIs. Task-number: QTBUG-89482 Fixes: QTBUG-89633 Change-Id: I4382dd53a225375759b9d042f6035a4a9810572b Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Update QOperatingSystemVersion version names for AndroidAssam Boudjelthia2021-01-191-0/+36
| | | | | Change-Id: I88c7713cd75f84d11b303e0dad2093c7d5568bc4 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Add version() to QOperatingSystemVersionLars Schmertmann2020-12-281-3/+16
| | | | | Change-Id: I6c7f0616d52b0d118ffd8c031f3f51212b8ed821 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add QOperatingSystemVersion support for macOS Big SurTor Arne Vestbø2020-07-291-0/+25
| | | | | | | | | Pick-to: 5.15 Pick-to: 5.12 Change-Id: Ide57f675b20b08210f301da5177df45d008423c4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* QSysInfo: remove deprecated windowsVersion() and macVersion()Edward Welbourne2020-07-221-4/+0
| | | | | | | | | Remove their associated enums, too. All deprecated since 5.9. Change-Id: Ieefba1a08c221ea7b62500f219baea8a3ccfb7db Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Doc: Add since versionPaul Wicking2019-12-191-0/+2
| | | | | | | | | | for QCursor::swap and QOperatingSystemVersion::currentType. Fixes: QTBUG-80854 Fixes: QTBUG-80891 Change-Id: Ia256fa0d3ad4665f44b933f5a4a8d4ee87e9fc13 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Remove QOperatingSystemVersion::WindowsVistaSona Kurazyan2019-09-051-8/+0
| | | | | | | | | | | The minimum supported version is Windows 7. Remove QOperatingSystemVersion::WindowsVista added by b0cd007335853f283c47ffb0f5611d14e6dbe84b and replace with "true" wherever it was used. Change-Id: I08c0208467b655a921b6773f77d8bc099be69031 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.13' into devLiang Qi2019-08-131-0/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/win32-clang-msvc/qmake.conf src/corelib/tools/qlist.h src/gui/painting/qcompositionfunctions.cpp src/gui/painting/qtriangulator_p.h src/gui/text/qfontengine_p.h src/network/kernel/qhostinfo_p.h src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io> Change-Id: Ib8a0308cf77224c4fbdcf56778fdac4a43e37798
| * macOS: Add system detection and version defines for macOS Catalina (10.15)Tor Arne Vestbø2019-08-011-0/+8
| | | | | | | | | | | | Change-Id: I127efe752ebb70825f1b31f0d64c4293d1c71820 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | Remove usages of QSysInfo's deprecated APIsSona Kurazyan2019-07-051-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | - Replaced QOperatingSystemVersion::WindowsVersion, QSysInfo::windowsVersion(), QSysInfo::macVersion(), QSysInfo::MacintoshVersion with QOperatingSystemVersion::current(). - Added QOperatingSystemVersion::WindowsVista for convenience, as it is used in lots of places. Change-Id: If9c4ac496005b2e70b5c70be160747afa74b98c1 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Remove handling of missing Q_COMPILER_INITIALIZER_LISTSAllan Sandfeld Jensen2019-05-021-2/+0
|/ | | | | | Change-Id: Id65b39c787235a051262544932e6717d076f1ea0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Move literal code block to a separate fileCristian Maureira-Fredes2018-10-151-10/+2
| | | | | | | | | | | We need to override this snippet for the documentation we generate for Qt for Python, and it is easier to have it on a separate file. Task-number: PYSIDE-801 Task-number: PYSIDE-691 Change-Id: Ideb5b6af25024279f167137d3b65660bb9c96a7e Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Add macOS Mojave (10.14) to QOperatingSystemVersionTor Arne Vestbø2018-06-181-0/+8
| | | | | Change-Id: I7dd53c9894b7d6ce4e41bf548e6ce0a17c3f3020 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.11Liang Qi2018-02-141-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/animation/qvariantanimation.cpp src/corelib/global/qglobal.cpp src/corelib/global/qlogging.cpp src/corelib/io/qprocess_win.cpp src/corelib/json/qjsonarray.cpp src/corelib/tools/qsimd_p.h src/corelib/tools/qtimezoneprivate_p.h src/corelib/xml/qxmlstream_p.h src/gui/kernel/qsimpledrag.cpp src/gui/kernel/qsimpledrag_p.h src/plugins/generic/generic.pro src/plugins/platforms/cocoa/qcocoamenu.mm src/widgets/styles/qmacstyle_mac.mm tests/auto/concurrent/qtconcurrentmap/BLACKLIST tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/dialogs/qmessagebox/BLACKLIST Change-Id: I508d686cf20f7f8cc6a7119b9bc7c3bbb505c58e
| * Support for Q_OS_ANDROID_EMBEDDED and android-embedded build flagsOtto Ryynänen2018-01-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The Embedded Android build (Boot to Qt Android injection) is defined by having both Q_OS_ANDROID and Q_OS_ANDROID_EMBEDDED flags defined, as well as having Qt config android-embedded. This commit enables the possibility to build embedded Android builds. (i.e. Qt build for Android baselayer only, without JNI) Change-Id: I8406e959fdf1c8d9efebbbe53f1a391fa25f336a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | Add currentType function to QOperatingSystemVersionJake Petroules2017-09-251-0/+10
| | | | | | | | | | | | | | | | This allows us to retrieve the current OS type without constructing an instance of the class, and it's also constexpr. Change-Id: I8b32a1aebeb8139fe3fcf146e5de558fa1060bb8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QOperatingSystemVersion: Add debug operatorFriedemann Kleint2017-09-201-0/+13
|/ | | | | | Change-Id: Ibc942196bef0edc74f34501830fc83cb64259e39 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QOperatingSystemVersion: add Android Oreo (v8.0, API level 26)Jake Petroules2017-08-221-0/+9
| | | | | | | | | | | [ChangeLog][Binary Compatibility Note] The variable QOperatingSystemVersion::AndroidOreo was added in this release. Code that uses this variable will not run under Qt 5.9.1. If backwards compatibility is desired, use instead QOperatingSystemVersion(QOperatingSystemVersion::Android, 8) Change-Id: I1da5a5577bf6b719e543a1ded1f9b912a83665c3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QOperatingSystemVersion: (potentially) fix compilation with QNX 6Marc Mutz2017-06-281-0/+2
| | | | | | | | | | | | According to qcompilerdetection.h, the Dinkumware C++ library does not have std::initializer_list, even though the compiler supports it. Add the missing Q_COMPILER_ guards. Change-Id: I84a7d5054c00dba38bcde15e277ceb0ee05e6cd7 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: James McDonnell <jmcdonnell@blackberry.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QOperatingSystemVersion/Android: compress global dataMarc Mutz2017-06-281-3/+6
| | | | | | | | | | The values do not need to be 2 x 32-bits. Eight bits suffice for a long time to come. Should save 189 bytes in text size on Android builds. Change-Id: I78e31e7caa7a698f41c66d7bbac58a766c6e8834 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update for the newest Darwin-family operating systemsJake Petroules2017-06-071-0/+8
| | | | | | Change-Id: Id6533c8a444854f6215f6e47000875ef9751905b Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add missing documentation for QOperatingSystemVersion::segmentCountJake Petroules2017-01-251-0/+6
| | | | | Change-Id: I6d24fbbaf60e07377a463ea1f72588812caaf4a7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix some qdoc-warnings for 5.9Friedemann Kleint2017-01-251-6/+6
| | | | | | | | | | | | | | | | | | qtbase/src/corelib/global/qoperatingsystemversion.cpp:119: warning: Cannot find 'QOperatingSystemVersion(...)' in '\fn' QOperatingSystemVersion::QOperatingSystemVersion(int maj, int min, int mic) qtbase/src/corelib/io/qdir.cpp:1852: warning: Unknown command '\p' qtbase/src/corelib/kernel/qabstracteventdispatcher.cpp:482: warning: Cannot find 'registerEventNotifier(...)' in '\fn' bool QAbstractEventDispatcher::registerEventNotifier(QWinEventNotifier *notifier); qtbase/src/corelib/kernel/qabstracteventdispatcher.cpp:495: warning: Cannot find 'unregisterEventNotifier(...)' in '\fn' bool QAbstractEventDispatcher::unregisterEventNotifier(QWinEventNotifier *notifier); qtbase/src/corelib/global/qoperatingsystemversion.cpp:268: warning: Can't link to 'macro()' qtbase/src/corelib/global/qoperatingsystemversion.cpp:296: warning: Can't link to 'typeName()' qtbase/src/corelib/io/qdir.cpp:1845: warning: Undocumented parameter 'filters' in QDir::isEmpty() qtbase/src/corelib/kernel/qobject.cpp:1636: warning: No such parameter 'interval' in QObject::startTimer() qtbase/src/network/bearer/qnetworkconfiguration.cpp:343: warning: Undocumented parameter 'timeout' in QNetworkConfiguration::setConnectTimeout() qtbase/src/gui/kernel/qoffscreensurface.cpp:337: warning: Undocumented parameter 'handle' in QOffscreenSurface::setNativeHandle() qtbase/src/platformheaders/xcbfunctions/qxcbwindowfunctions.qdoc:109: warning: Unknown command '\role' qtbase/src/widgets/util/qundostack.cpp:727: warning: Command '\li' outside of '\list' and '\table' ... Change-Id: I57bff895a8e1afd94b582a6a72a06771514ee27e Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Polish up the QOperatingSystemVersion API and documentationJake Petroules2017-01-181-40/+43
| | | | | | | | | | | | | operator== and operator!= have been disabled, as they are likely to be misused and are not particularly useful in practice. The same goes for the QVersionNumber conversion convenience functions. The constructor normalizes version component values so that invalid versions like [5, -1, 3] cannot be constructed and made to wreak havoc on assumed logic. Change-Id: Iabb6876bd5dc11522032837f78cf825b921a49b2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix whitespace, formatting, and line length in QOperatingSystemVersionJake Petroules2017-01-171-52/+95
| | | | | Change-Id: Ie26571a8098e8215a6bc1e0e363763e5fc546bcd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Complete QOperatingSystemVersion documentationJake Petroules2016-12-061-4/+20
| | | | | | | | This adds documentation for QOperatingSystemVersion::OSType and cleans up some extraneous quotes. Change-Id: Idaeb163caded9a51ce0fbcc812eb622b4227844e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QOperatingSystemVersion: add Android Nougat MR1 (v7.1, API level 25)Jake Petroules2016-10-281-0/+8
| | | | | Change-Id: I1c391fc06b6fc5bb97d402ab3c3bc40520d26269 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QOperatingSystemVersion: add separate variables per Android API levelJake Petroules2016-10-281-7/+28
| | | | | | | | | | | | | | | | | It's nonsensical to have a variable like AndroidJellyBean which is documented as Android versions 4.1 through 4.3 but is actually codified as 4.1. Add separate variables for Android "maintenance releases" which incremented both the version number and API level. "MRn" where n is an integer is the same naming convention the Android APIs use. The only exception to this rule is Android 4.4W (API level 20) which was KitKat for watches. 4.4W is not a representible or comparable version number, so for now, AndroidKitKat will identify both Android 4.4 and 4.4W (API levels 19 and 20). As Qt does not yet support Android Wear, this is not expected to be a problem in practice. Change-Id: I28473bad86bbe747db292bd0a9a164eeeba56a32 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix signed-unsigned mismatch with gcc 4.9.0Laszlo Agocs2016-10-071-5/+5
| | | | | | | | | | | | | | | Android NDK r10d with gcc 4.9.0 fails with: gglobal/qoperatingsystemversion.cpp: In static member function 'static QOperatingSystemVersion QOperatingSystemVersion::current()': global/qoperatingsystemversion.cpp:150:25: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] if (sdk >= 1 && sdk <= sizeof(versions) / sizeof(versions[0])) { Switch to size_t and store the array index in order to simplify. Code is new in dev, introduced in 26b2ad5a181eab7ad04ba819004bcc619c24147b Change-Id: Ia19cfcb9789e225760f4d1a05c91463f4c7c2302 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Long live QOperatingSystemVersion!Jake Petroules2016-09-181-0/+394
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>