summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qcore_mac.mm
Commit message (Collapse)AuthorAgeFilesLines
* macOS: Initialize standard NSUserDefaults as early as possibleTor Arne Vestbø2021-02-111-0/+15
| | | | | | | | | | | | | | | | | | | | | | The standard user defaults are initialized from an ordered list of domains, as documented by NSUserDefaults.standardUserDefaults. This includes e.g. parsing command line arguments, such as -AppleLocale "fr_FR", as well as global defaults. AppKit does this during [NSUserDefaults init], which in turn initializes the locale returned by CFLocaleCopyCurrent() and NSLocale.currentLocale. If those functions are called before NSUserDefaults does its thing the locale will already have been created, and the logic in NSUserDefaults won't have any effect -- nor is there any way for us to set/override the locale after this. To ensure that the -AppleLocale command line override is available through the lower level Core Foundation preferences APIs, we need to initialize the user defaults as early as possible via the Foundation-API. Change-Id: I906a5a8b05a7216e60020ec45f8da725b801d2c5 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: Add missing QT_MANGLE_NAMESPACEMorten Johan Sørvig2020-12-081-1/+1
| | | | | | | | | | | KeyValueObserver and RunLoopModeTracker were causing “Class is implemented in both...” messages when loading multiple namespaced Qt versions into the same process. Change-Id: Idbd2229c61cde6fba2c12b35d045390a371dee68 Fixes: QTBUG-89059 Pick-to: 6.0 5.15 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Handle simulator platforms when parsing LC_BUILD_VERSION load commandTor Arne Vestbø2020-08-191-5/+26
| | | | | | | | Task-number: QTBUG-85764 Pick-to: 5.15 Pick-to: 5.12 Change-Id: Ie46bee0937908e2dfedfa3532394dde015abf891 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Teach QMacVersion to deal with 32-bit Mach-O headersTor Arne Vestbø2020-08-051-1/+3
| | | | | | | Pick-to: 5.15 Pick-to: 5.12 Change-Id: I7946aa35722bc76326e2d6cf0820353c4ba13fad Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Resolve SDK and deployment target OS from load commandTor Arne Vestbø2020-08-041-7/+25
| | | | | | | Pick-to: 5.15 Pick-to: 5.12 Change-Id: Icce79186645f173b7f9be8ee6da0abed25cf3da0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add QOperatingSystemVersion support for macOS Big SurTor Arne Vestbø2020-07-291-0/+83
| | | | | | | | | 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>
* macOS: Move key mapping from QtCore to platform pluginTor Arne Vestbø2020-07-021-142/+0
| | | | | | | | | | | There's a bunch of similar and overlapping logic in QCocoaKeyMapper already. Moving it to the same place allows us to easier find ways to reduce the overlap. None of the exported functions were used outside of the plugin. Change-Id: I6953690cdfda5ee8265b33ccbf919184c3a1700f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Clean up headersTor Arne Vestbø2020-06-051-0/+14
| | | | | | | | | | | | | | The headers are now C++ clean and can be used outside of Objective-C code. All includes of Objective-C frameworks have been moved to the implementation files. Header guards have been added in the few places they were missing. All includes are now done via #include, instead of sometimes using the #import variant. Change-Id: Ibb0a9c0bcfefbda4347737212e40e300a3184982 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Replace some QString::fromRawData() with QStringViews around the codeMarc Mutz2020-05-121-1/+1
| | | | | | | | | Even though QString::fromRawData() may not be as expensive as it used to be, it's still and out-of-line call _and_ more characters to type, so replace with QStringView construction where applicable. Change-Id: I70662da1bd45284f67e117e92b25d242afb8aaf8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* macOS: Remove all use of deprecated Q_OS_OSX defineTor Arne Vestbø2020-04-031-2/+2
| | | | | Change-Id: I49c285604694c93d37c9d1c7cd6d3b1509858319 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: Merge qcore_mac cpp and mm filesTor Arne Vestbø2020-03-121-0/+673
Files ending with .mm are Objective-C++ files, so we don't need a separate file for the C++ parts. Change-Id: I3ef52bc98291fd461b889978a538e81630d17c6e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>