summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
Commit message (Collapse)AuthorAgeFilesLines
* QAbstractEventDispatcher: change event dispatcher timer interval to qint64Liu Yang2020-09-212-2/+2
| | | | | | | | | Resolve remaining Qt6 TODO [ChangeLog][QtCore][QAbstractEventDispatcher] The signature of the abstract virtual registerTime function now takes a qint64 value for the interval parameter. Change-Id: I10166ad5cfb455edc404d465a3731ff094a8977e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Handle NSEvent*MouseDragged in QCocoaWindow::startSystemMove()René Meusel2020-09-181-0/+3
| | | | | | | | | | | The documentation for [NSWindow performWindowDragWithEvent:] only mentions mouse-down events, but starting a drag from move and drag events works too, so include them as well. Pick-to: 5.15 Fixes: QTBUG-85105 Change-Id: Ib6c29ed4035bfccc61d50a7f95f564fb3d56fcf6 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* xcb: Reduce number of created colormapsAlexander Volkov2020-09-164-12/+26
| | | | | | | | | | Create a colormap per visual, not per window. Pick-to: 5.15 Change-Id: I97d94618f159b4beaffd4a1afe0611233ced6676 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Windows QPA: Remove unused functionFriedemann Kleint2020-09-161-10/+0
| | | | | | | | | | Amends 983132212c7f3541a8c5fbaf4c5309d92345107f. Pick-to: 5.15 Task-number: QTBUG-86575 Task-number: QTBUG-85676 Change-Id: Id2ea85738a2565ec0d9f33ccb264c11754e1e5ff Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Remove dead codeVolker Hilsheimer2020-09-151-16/+0
| | | | | | | And remove another ### Qt comment, this time ### Qt 5. Change-Id: I1d5cef47ddd81b6a27f870599128c8f16846c350 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Windows QPA: Fix build with mingw64/Win32 threadingFriedemann Kleint2020-09-151-7/+25
| | | | | | | | | | | | | For this build, cxx11_future is not available and thus QThread::create() as introduced by ed114b728d9dc5265333c593254d9f6527464a60 does not work. Revert back to implementing a QThread. Pick-to: 5.15 Fixes: QTBUG-86575 Task-number: QTBUG-85676 Change-Id: I86a91f6bcdfc88804b35bf617362d92f37e51dea Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Switch QSurfaceFormat::colorSpace to a QColorSpaceAllan Sandfeld Jensen2020-09-152-4/+5
| | | | | | | Allows more flexibility in the future. Change-Id: Idcf2d8ddaee268a7b5d55379ccb42dd9b3c33abf Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Fix -Wunguarded-availability-new for userInterfaceStyleAndré Klitzing2020-09-141-4/+6
| | | | | | | | | 'userInterfaceStyle' is only available on iOS 12.0 or newer [-Werror,-Wunguarded-availability-new] if (previousTraitCollection.userInterfaceStyle != self.traitCollection.userInterfaceStyle) { Pick-to: 5.15 Change-Id: Id6340f70019d55ab2a0707b1aebd6d333e9544cb Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add missing #includes for FreeBSD buildAdriaan de Groot2020-09-141-0/+1
| | | | | | | | | | | QFile is no longer included implicitly via other headers, so include it explicitly in the FreeBSD framebuffer code. This is needed to make it compile (at all, although there are also API changes to chase and general bitrot). Change-Id: I3801a39503f545a24a3b2c58122774b5697358e9 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Plumb application quit through platform pluginTor Arne Vestbø2020-09-145-4/+9
| | | | | | | | | | | | | | | | | | If we have a platform plugin we ask the platform to quit, and if not we fall back to the base implementation of QCoreApplication that sends Quit events directly. This allows the platform to involve the rest of the system in the process. The platform will then come back with a spontaneous quit via QWSI::handleApplicationTermination(), which will then send the corresponding Quit even from QGuiApplication like normal. Task-number: QTBUG-45262 Task-number: QTBUG-33235 Task-number: QTBUG-72013 Task-number: QTBUG-59782 Change-Id: I0000aaf7192e4b905933c5da0e53901c6c88f26a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Make QStringList an alias to QList<QString>Lars Knoll2020-09-121-2/+0
| | | | | | | | | | | | | | | | | | Fix our API, so that QStringList and QList<QString> are the same thing. This required a bit of refactoring in QList and moving the indexOf(), lastIndexOf() and contains() method into QListSpecialMethods. In addition, we need to ensure that the QStringList(const QString&) constructor is still available for compatibility with Qt 5. Once those two are done, all methods in QStringList can be moved into QListSpecialMethods<QString>. Change-Id: Ib8afbf5b6d9df4d0d47051252233506f62335fa3 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Rename QLibraryInfo::location() to path()Lars Knoll2020-09-121-1/+1
| | | | | | | | As per ### Qt6 comment. Also rename the LibraryLocation enum to LibraryPath. Change-Id: I556025a19c5bcdf2ff52598eaba32269522d4128 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QStyle: return 'Fusion' instead of 'fusion'Richard Moe Gustavsen2020-09-124-4/+4
| | | | | | | | | | | | This change should have no impact on Widgets, since style names there are case-insensitive. But for QtQuick controls the style names are case sensitive. So in order to use the style hint from the platform theme for controls, we need to return the name with an uppercase "F". Change-Id: I360f43f174938202b0ef2cdfcde6daf39c9f39bb Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Clang 10: Fix missing-exception-spec error on WindowsKai Koehne2020-09-111-0/+1
| | | | | | | | | | | | Fix error qtbase/src/plugins/platforms/windows/qwindowsdropdataobject.cpp:67:25: error: 'GetData' is missing exception specification '__attribute__((nothrow))' [-Werror,-Wmissing-exception-spec] QWindowsDropDataObject::GetData(LPFORMATETC pformatetc, LPSTGMEDIUM pmedium) Follow the example of just disabling microsoft-exception-spec here. Change-Id: I61feb59e188bff7fdfb30e88f8a06c61ec808828 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* 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>