summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
Commit message (Collapse)AuthorAgeFilesLines
* macos: Rename macos style to macOSRichard Moe Gustavsen2020-09-111-1/+1
| | | | | | | | | This change shouldn't matter much to widgets, since style names there are case insensitive. But for controls style names are case sensitive, and in that case, "macOS" looks more correct. Change-Id: Ia1d442bce465692ff58fecba1cc68ecbb2e52549 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Do not expose xlib as public dependency of QtGuiJoerg Bornemann2020-09-113-0/+5
| | | | | | | | Consumers of QtGui should link explicitly to xlib if needed. Fixes: QTBUG-86421 Change-Id: Ibc94eb1c1ac405b53749b320c388b037bf693a08 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* [macOS] Add native virtual key code to modifier keysMichael Brüning2020-09-101-9/+18
| | | | | | | | | | | | | | Not forwarding the native virtual key code when sending key events in the flagsChanged handler caused a number of problems, e.g. the inability to determine which of the Alt or Shift keys were pressed. Use handleExtendedKeyEvent to include the native virtual key code. Patch inspired by Nyan Pasu. Fixes: QTBUG-69608 Change-Id: I15e9ff1069528d4b50ee4638ab2d8a6fd279db0b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* X11: set fallback logical DPI to 96Morten Johan Sørvig2020-09-101-6/+6
| | | | | | | | | | | | | | | | | | Returning physical DPI from logicalDpi() is problematic, as explained in commit 77e04acb. The most predictable implementation is to never return physical DPI from QPlaformScreen::logicalDpi(). Other platform plugins already does this, and this change brings xcb in line with the rest of Qt. We have the QPlatformScreen::physicalSize() API which covers returning physical DPI (indirectly); Options for selecting which one to use can be implemented on top of these (see QT_USE_PHYSICAL_DPI). Change-Id: Ifc41229fa63734a2eb06b3acefd97b2ed3e57c2d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Port from devicePixelRatioF() to devicePixelRatio()Morten Johan Sørvig2020-09-102-4/+4
| | | | | | | This ports all of QtBase. Change-Id: If6712da44d7749b97b74f4614a04fac360f69d9e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix a number of MSVC integer conversion warningsFriedemann Kleint2020-09-101-1/+1
| | | | | | | | Mostly related to qstrlen(). Change-Id: I69e2052c83766e4fc466ed398d0d0eac011a77ec Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Avoid crashing in offscreen with X11 builtin but not availableAllan Sandfeld Jensen2020-09-091-2/+4
| | | | | | | Pick-to: 5.15 Change-Id: Id385bc750f1cc6dfc2ad7e0248dbc56fa5b6e4d2 Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Windows QPA: Enable toggling Windows transparencyFriedemann Kleint2020-09-082-4/+7
| | | | | | | | | | | | | | Change QWindowsWindow::format() to return the QWindow's requested format instead of storing it as do the other platforms. This will cause the alpha (layered flag) to be adapted in QWindowsBackingStore::flush(). Note that it does not fix the issue; the window does not update correctly after changing WS_EX_LAYERED. Pick-to: 5.15 Task-number: QTBUG-60822 Change-Id: I3facd93f993b3b422b6818d55c1bce884fb57234 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* macOS: Don't assume we will get didBecomeKey for non-Qt NSWindowsTor Arne Vestbø2020-09-081-9/+12
| | | | | | | | | | | | The optimization resulted in losing out on window focus changes when for example a native file dialog was shown, resulting in the cursor blinking both in the parent window, and in the native file dialog. Pick-to: 5.15 Pick-to: 5.12 Change-Id: I9c1f9df20fbc5c4b80f906ded70d9a2658b70438 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Get rid of hasPendingEvents() and flush()Lars Knoll2020-09-066-44/+3
| | | | | | | They are unused. Change-Id: I77383f2be45551401ed9c2f88285511134cc8b0d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QWindowsKeyMapper: fix mixed math between int and enum/flagsGiuseppe D'Angelo2020-09-051-3/+3
| | | | | | | | | Either do it between ints, or cast to the right types before doing it. This should enable removing operator+ and - between int and QFlags. Change-Id: I30ecc03566cff8ce880b048ba3a9d7d50f3c8509 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix compiler warnings after QKeyCombination introductionVolker Hilsheimer2020-09-052-11/+10
| | | | | Change-Id: If5d7c5e037b99c14c51d83adf8b1e20d6b924bc5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* xcb: drop Xinerama supportLiang Qi2020-09-047-48/+3
| | | | | | | | | | [ChangeLog][Important Behavior Changes][X11] Xinerama is no longer supported. Fixes: QTBUG-86082 Change-Id: Ieb57d9035e1659fc22bf8333247fc3573fb62992 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Fix memory sanitizer complaint about uninitialized valueLiang Qi2020-09-041-1/+1
| | | | | | | Fixes: QTBUG-86383 Pick-to: 5.15 Change-Id: Ib2bbe5d8e11574456fdc8b5c5fb07f5e41b538b3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QCocoaKeyMapper: do not sum integral+QFlagsGiuseppe D'Angelo2020-09-031-2/+2
| | | | | | | | It will become illegal; keep the semantics but force the right casts. Change-Id: I4002c5bca6eb90e798e35ca263e7bbb4ff5ad4b1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix warning: don't compare Qt::TouchPointReleased and QEventPoint::StateShawn Rutledge2020-09-021-1/+1
| | | | | | | | They are actually equivalent, but from different enums. Change-Id: Ic5f148e2e6bb260c226026b3f89333626a6020ec Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Android: Fix warning: unused variable 'm_statusBarShowing'Alessandro Portale2020-09-011-2/+0
| | | | | Change-Id: I612c2239f1626abb1841100745d17f54f60e806b Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Include qhash.h in header instantiating QHashEdward Welbourne2020-08-281-0/+1
| | | | | | | | | | Include what you use. In this case, the include needs to happen before qpa/qplatformmenu.h, since that seems to pull in src/gui/kernel/qwindowdefs.h, which confuses matters (somehow) with a forward declaration. Change-Id: Ic09ecb014563e8ebee86f338c7e98e470f82185b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QIconEngine: move away from virtual_hook usageMorten Johan Sørvig2020-08-272-2/+2
| | | | | | | | | | | | | | | | | | | | | Upgrade existing functions to be virtual functions: - virtual QString iconName() - virtual bool isNull() - virtual QPixmap scaledPixmap(...) - virtual QList<QSize> availableSizes(...) Make all of them non-const and remove the const_casts in the implementation. Keep the default implementation which calls virtual_hook(), for compatibility. Note: availableSizes was already virtual, but now loses the “const”. Port two overrides in the platform themes. Keep virutal_hook() around for future expansion. Task-number: QTBUG-85885 Change-Id: I76d0c9f75bfd6ca870c669047d4ef18b82c692e5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add QOffScreenSurface platform API abstractionAssam Boudjelthia2020-08-275-38/+44
| | | | | | | | | | | | | | | | | | | | | This follows the work done in 6ff79478a44fce12ca18832a56db4a370a9ff417. The API is available by including qoffscreensurface.h, scoped in the QPlatformInterface namespace. The namespace exposes platform specific type-safe interfaces that provide: a) Factory functions for adopting native contexts, e.g. QAndroidPlatformOffscreenSurface::fromNative(ANativeWindow); b) Access to underlying native handles, e.g. surface->platformInterface<QAndroidPlatformOffscreenSurface>() ->nativeSurface() Fixes: QTBUG-85874 Change-Id: I29c459866e0355a52320d5d473e8b147e050acb3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* X11: restrict fallback logical DPI to 96 and higherMorten Johan Sørvig2020-08-261-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QXcbScreen determines logical DPI using the following priority: 1) use Xft.dpi if set 2) virtual desktop size / virtual desktop physical size (This change does not restrict or alter the value obtained from Xft.dpi in any way) The fallback option 2) has several problems: - It is a physical DPI, which does not account for viewing distance or user preference - It is a global value for the entire virtual desktop (not per-screen) - X servers usually fake the virtual desktop physical size such that the computed DPI ends up at 96; in cases where this does not happen we can end up with a surprising DPI value. We might be better off just hardcoding 96 here, to avoid picking up an incorrect physical DPI when for example connecting to a TV (as reported in QTBUG-67928). This change does not go as far as hardcoding 96, but instead restricts the (fallback) DPI value to be 96 or higher. Pick-to: 5.15 Task-number: QTBUG-67928 Change-Id: Ieea6c7a137261282b40302fb4c19273c5def10af Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: rename 'macintosh' style to 'macos'Richard Moe Gustavsen2020-08-261-1/+1
| | | | | | | | | | | | | | Change the name/key of the style to 'macos'. Besides the name 'macintosh' being archaic, we also need this change to avoid creating 'macintosh' style folders in QtQuickControls, now that we plan to use QPlatformTheme also there to resolve the style. [ChangeLog][Widgets][QStyle] The 'macintosh' style has been renamed to 'macos'. Change-Id: I14b8a8b4dbd369e7a7d16b94e4ad27e501e7e8d0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Smart pointers: port to explicit operator boolGiuseppe D'Angelo2020-08-261-1/+1
| | | | | | | | | | | | | Enough with the restricted bool trick; use the established solution. [ChangeLog][Potentially Source-Incompatible Changes] QScopedPointer, QSharedPointer and QWeakPointer's conversion operator towards bool is now explicit. In some cases this may require an explicit cast towards bool that was not needed before (notably, when returning an object of these types from a function that actually returns bool). Change-Id: I02b89278e75b7e7493ee7e35460504719e00f028 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix warning from unused parameterVolker Hilsheimer2020-08-261-0/+1
| | | | | Change-Id: I2e31d43492f94edf4030fdbd88c1000396bdf250 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Android: split arguments passed to the main appAssam Boudjelthia2020-08-251-1/+2
| | | | | | | | | | | Keep the same behavior as desktop platforms with QApplication::arguments() should return a string list of args not a string of args together. Task-number: QTCREATORBUG-23712 Change-Id: I1874655427f5c902ca81a3fcf6183d0eeccbfef7 Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* Rename confusingly named QFont/QPalette::resolve overloadsVolker Hilsheimer2020-08-251-1/+1
| | | | | | | | | | | | | | | Having three methods with the same name doing different things is unnecessarily confusing, so follow the standard naming convention in Qt and call the getter of the resolve mask resolveMask, and the setter setResolveMask. These methods were all documented as internal. The publicly documented resolve() method that merges two fonts and palettes based on the respective masks remains as it is, even though 'merge' would perhaps be a better name. Change-Id: If90b1ad800834baccd1dbc38fc6b861540d6df6e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix warning after QMetaType changesVolker Hilsheimer2020-08-251-1/+1
| | | | | Change-Id: Id0a8ac5cc516732e6bc03c4a7d153486003d0881 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* wasm: deregister event handlersLorn Potter2020-08-252-0/+22
| | | | | | Pick-to: 5.15 Change-Id: I453b87497c7ed93b92bf9f4c59ab1c8bd1d7712e Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* xcb: remove QT_XCB_NO_XI2_MOUSE code pathGatis Paeglis2020-08-234-134/+13
| | | | | | | | | | | | | | | This code path was deprecated in 5.12 and scheduled for removal in Qt 6. See 9184384bc9d9d71a146fff535021357258a0295e. According to the source comments from f48170b479df359f47af12b03a501d9d0c386e66, apperantly XInput2 had some issues when running on Xinerama screens and therefore there was a check for it in xi2MouseEventsDisabled(). We plan to remove Xinerama support, therefore Xinerama handling in xi2MouseEventsDisabled() is irrelevant. Task-number: QTBUG-69412 Change-Id: I384d7c46337358caecccf644acc8ffbd381dc69d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* qwsi: revert parts of 00ae1e6b7bf6efa5f5e57d37844e44d521604fb6Gatis Paeglis2020-08-231-2/+0
| | | | | | | | | | | | | | We actually do not need this "mode" in qwsi API. I think while writing the patch from 00ae1e6b7b I got confused by focusing on my test application. We can't know what the native event filter will filter out, therefore it makes sense that we unconditionally do filtering at qwsi level as well for user input vs other events in QWindowSystemInterface::sendWindowSystemEvents(). Pick-to: 5.15 Pick-to: 5.12 Change-Id: Idb23152a24bf3ba3b91804427a6e78f991969c29 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* xcb: Fix flushing of native subwindows when not using shared memoryTor Arne Vestbø2020-08-221-2/+11
| | | | | | | | | | | | | | | | | | | | | When using X-forwarding we're not using shared memory for the backing store image, and end up in a code path where we first copy the updated parts of the backing store from our client side image over to the server, and then flush those parts from the server-side image to the window. The problem was that this code path didn't account for the possibility that we'd flush a sub-window at an offset, and would end up uploading the sub-window local region directly, without applying the offset. This problem was revealed when 79bf1b7e348d started being smarter about what regions we flush and to what windows when we have sub windows. Fixes: QTBUG-81723 Pick-to: 5.15 Pick-to: 5.12 Change-Id: I1c9c8bc53c088cdc1ae8b892e17930f4a468ccad Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Properly deprecate Qt::MidButton in favor of Qt::MiddleButtonEdward Welbourne2020-08-226-20/+20
| | | | | | | | | | | | MidButton had its // ### Qt 5: remove me upgraded to Qt 6 at 5.0; but it dates back to 4.7.0 Replace the many remaining uses of MidButton with MiddleButton in the process. Pick-to: 5.15 Change-Id: Idc1b1b1816673dfdb344d703d101febc823a76ff Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move QStringRef and remains to Qt5CompatKarsten Heimrich2020-08-201-1/+1
| | | | | | | | | Export some private functions from QUtf8 to resolve undefined symbols in Qt5Compat after moving QStringRef. Task-number: QTBUG-84437 Change-Id: I9046dcb14ed520d8868a511d79da6e721e26f72b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* CMake Build: Fix libdrm detection and compilation on QNXCristian Adam2020-08-192-0/+14
| | | | | | | | | | | | On QNX 7.1 x86drm.h is located under <...>/usr/include/libdrm, unlike linux where it's present under /usr/include. find_path would not find it on QNX, and instead get /usr/include from host, which resulted in a failure to compile. Task-number: QTBUG-83202 Change-Id: I03d6c2d4dfbe91bb70df0a322e84890bd7c8548a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Use the factor() function for getting scale factorsMorten Johan Sørvig2020-08-191-2/+2
| | | | | | | | | Make the code less dependent on (changing) high-dpi internals. Change-Id: Ifc7cb4aab1c1c70016ca86639edf5c9630999f9e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Cocoa: Translate the buttons used for the native font and color dialogsAndy Shaw2020-08-192-6/+7
| | | | | | | | | | | Use the QPlatformDialogHelper standard buttons to get the translated button text as then this will already have been translated for those loading a translation. Pick-to: 5.15 5.12 Fixes: QTBUG-85725 Change-Id: Ia42d93aeb6e1b5c0528564a6c960a35f6710c8eb Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* macOS: Remove support for surface-backed viewsTor Arne Vestbø2020-08-188-416/+32
| | | | | | | | | | | | | Our deployment target is 10.14, which enables layer-backing by default, and our layer-backing support nowadays is stable enough that we don't need to maintain any of the old code paths for compatibility. The wantsBestResolutionOpenGLSurface property on NSView is only relevant for surface-backed views, so we no longer need to deal with it. Change-Id: I8aef4ac99371113d463ac35eee648a8a2fd1ea72 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Replace Qt CONSTEXPR defines with constexprAllan Sandfeld Jensen2020-08-142-5/+5
| | | | | | | | Both normal and relaxed constexpr are required by our new minimum of C++17. Change-Id: Ic028b88a2e7a6cb7d5925f3133b9d54859a81744 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* QAtomic*: purge deprecated load() and save() methodsEdward Welbourne2020-08-141-2/+3
| | | | | | | | Deprecated in 5.14 in favor of loadRelaxed() and storeRelaxed(). Caught one surviving use of load() in the ios platform plugin. Change-Id: I9518064a948e5d26ccb956490cbb0561bed5d8b5 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Windows QPA: Fix omitted Drop eventAndre de la Rocha2020-08-131-17/+6
| | | | | | | | | | | | | | | In some rare cases, when a mouse button was released while the mouse was static, a drag and drop operation would not be completed until the mouse was moved. Probably due to a Windows bug, the mouse button state supplied through the arguments of the IDropSource callbacks, called from the internal DoDragDrop() loop, would not reflect the actual mouse button state in this case. This change makes the callback implementation use the actual mouse button state provided by GetAsyncKeyState(). Fixes: QTBUG-85300 Pick-to: 5.15 Change-Id: I3405bdf7076ddc46415cd274a502434bdc0d2f3f Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows: Remove method not existing in base classKai Koehne2020-08-121-1/+0
| | | | | Change-Id: Ifd016eabb07849fb3f310593ebe5301d3a9b09c1 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* QNX: fix buildSamuli Piippo2020-08-121-2/+2
| | | | | | | | Remove unused argument and use default contructor for the flags. Change-Id: I09d319bc58199ed713333055a2fdd519c249f831 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
* QNX: register mouse input deviceSamuli Piippo2020-08-122-8/+27
| | | | | | | | | | Use the new QWSI APIs that take a registered input device. Task-number: QTBUG-85852 Change-Id: Iefb8239a60ff819172ba64f35f120cdc6975257f Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: James McDonnell <jmcdonnell@blackberry.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* wasm: detect canvas resize using ResizeObserver APIMorten Johan Sørvig2020-08-112-0/+45
| | | | | | | | | | | | | The ResizeObserver API is now available on the major desktop browsers (Safari, Chrome, Firefox), and can be used to handle canvas resize. (Previously, we got a callback on viewport resize only) Pick-to: 5.15 Change-Id: I8737285416bef70641f90da793c85efcb24f3623 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* wasm: fix natural scrolling on macLorn Potter2020-08-111-1/+1
| | | | | | Pick-to: 5.15 Change-Id: Icc41b2c54a2e8d0da11ba5068bdde1a0c20686e0 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Fix build with mingw gcc 9 and -Wsuggest-overrideKai Koehne2020-08-109-39/+49
| | | | | Change-Id: I780b0761a7f6b19022116b738efa7aca1378b715 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Android: Add support for travesing directories and accessing filesAndy Shaw2020-08-072-3/+91
| | | | | | | | | | | | | | | | | | | This enables QDir and QFileInfo/QFile to work with entries found from a entryList() as it will obtain the permission for these files correctly when it is encountered. Due to what seems to be a quirk in the Android API, we cache whenever we come across a known directory to save time later on for checking if it is a directory. All uris accessed where we get permissions for are cached so we get the right URI for that given content url as some are granted via the Intent. Fixes: QTBUG-85538 Fixes: QTBUG-83041 Fixes: QTBUG-76886 Pick-to: 5.15 Change-Id: I685b3c60804812a0e4b85fbdbb4ec5efaa09420c Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* macOS: Handle platform window destroy and create in backingstoreTor Arne Vestbø2020-08-072-16/+36
| | | | | | | | | | | | | | | We observe changes to the NSWindow to pick up color space changes, so we need to track when the platform window is destroyed and created to match our observer with the recreated NSWindow. This does not handle the fact that we're internally recreating the NSWindow if certain window flag changes requires so, without letting clients know via surface events. Task-number: QTBUG-85915 Pick-to: 5.15 Change-Id: I7a7d728c742def79adebaadc985cedd86ea0d581 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* macOS: Fix crash when re-using backingstore for re-created QWindowTor Arne Vestbø2020-08-071-0/+8
| | | | | | | | | | | | | | | | | | | The observer we add for the NSWindow of the backingstore window will not be valid once that window is destroyed, but we may get last minute notifications for it still, in which case our platform window is gone. This patch fixes the immediate crash, but reveals a more fundamental problem of assuming the platform window that's alive during construction is the one that will always be used with the backingstore. This is not the case when for example QtWidgets opens a combo box, and reuses the backingstore for the widget each time the combobox popup is shown. Fixes: QTBUG-85915 Pick-to: 5.15 Pick-to: 5.12 Change-Id: Ia66a45d003882602ac29476aabf2d58b0ac33c1e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Make QFontDatabase member functions staticEskil Abrahamsen Blomfeldt2020-08-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | QFontDatabase is a singleton and all instances would share a single, mutex-protected global data pointer. But some functions were implemented as non-static functions. This caused a lot of code on the form QFontDatabase().families(...) since there was no static access. Other functions were implemented as static. To consolidate, we make all functions static. This should be source-compatible, but not binary compatible. [ChangeLog][QtGui][Fonts] Some functions in QFontDatabase were in principle static, but previously not implemented as such. All member functions have now been made static, so that constructing objects of QFontDatabase is no longer necessary to access certain functionality. Fixes: QTBUG-83284 Change-Id: Ifd8c15016281c71f631b53387402c942cd9c43f6 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>