summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-282-16/+43
|\ | | | | | | Change-Id: I7803400aa500363fbaa57b0661315064bd3239d9
| * macOS: Only skip screen reconfigure if primary screen changedTor Arne Vestbø2019-10-271-3/+2
| | | | | | | | | | Change-Id: Ia5d208ace5086e8e92f95f859383773894a18768 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * macOS: Extend QCocoaScreen loggingTor Arne Vestbø2019-10-271-3/+31
| | | | | | | | | | Change-Id: I91f89ff336b3f48aea91e50860264bd8359805cb Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * macOS: Class initialize QCocoaScreen membersTor Arne Vestbø2019-10-272-5/+5
| | | | | | | | | | Change-Id: I163858400da28668b8a85241e9e6b1d989227a3e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * macOS: Don't leak CFUUIDRefs when resolving NSScreen for platform screenTor Arne Vestbø2019-10-271-1/+1
| | | | | | | | | | Change-Id: I5609071346ef44dc9f16359db451ea9b29dd2b0d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * macOS: Remove assert that primary display always matches CGMainDisplayIDTor Arne Vestbø2019-10-271-4/+4
| | | | | | | | | | | | Fixes: QTBUG-78707 Change-Id: Ia517f543728c76dcf19558e9e68ed97db7cfaaa4 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-261-0/+2
|\| | | | | | | Change-Id: I208a36bf1c88c8291baaa5ca8fe8e838bc9d7aea
| * Windows QPA: add support for MouseDoubleClickDistanceFilippo Cucchetto2019-10-251-0/+2
| | | | | | | | | | | | | | | | Query the double click distance using the windows GetSystemMetric. See https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getsystemmetrics Change-Id: I6198a38ab1a6216286897f8bdb305f334b7b148e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-257-55/+52
|\| | | | | | | Change-Id: Iebedaa967a263854f18cd403ce007d7965f26d2b
| * macOS: Don't set NSOpenGLPFANoRecovery for layer-backed viewsTor Arne Vestbø2019-10-241-8/+0
| | | | | | | | | | | | | | | | The Apple software renderer is perfectly capable of being used when compositing CA layers. Change-Id: I3b78ff61a79869ecdb7bd431388041f2c124472e Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * macOS: Respect Qt::AA_UseSoftwareOpenGLTor Arne Vestbø2019-10-241-0/+6
| | | | | | | | | | Change-Id: Ia83e8e9e571e4f46d2a8d810c376015552755457 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * macOS: Skip NSOpenGLContext flush if window exposed size is out of syncTor Arne Vestbø2019-10-241-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some clients such as QOpenGLWidget will end up drawing and flushing during the resize event, which for GL will result in an immediate update on the screen. The problem is that the underlying Core Animation layer, and the window's frame, has not been visually updated yet to the new size, so we end up drawing "ahead" of what the window server is showing the user. Ideally we'd be able to present the GL drawing in a transaction, in sync with the drawing of the window frame, but this API is only available for CAMetalLayer and CAEAGLLayer. As a workaround we detect when the exposed size is out of sync with the window geometry, and skip the flush until the exposed size has caught up. We know this will happen eventually as AppKit will always ask us to display after a resize. Change-Id: I1739ac8878b3fc6820a55dd017ddd170fd5f55d6 Fixes: QTBUG-79139 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * macOS: Improve handling of wantsBestResolutionOpenGLSurfaceTor Arne Vestbø2019-10-243-30/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were disabling wantsBestResolutionOpenGLSurface whenever we detected the Apple software renderer, but this isn't needed when layer-backed, and did in fact result in the exact same visual result as the bug the code was working around -- only rendering to a quarter of the viewport. We now apply the workaround only when software rendering is combined with surface-backed views. The logic has also been improved to not rely on string comparison to look for the software renderer, but instead uses the renderer ID that the context provides. Since tweaking the wantsBestResolutionOpenGLSurface is only relevant when using a window for GL rendering the logic has been moved into QCocoaGLContext. Change-Id: I021aaefbb7a9782bc8ee3c9703da246510326d50 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-244-19/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qstandardpaths_unix.cpp src/corelib/tools/qsharedpointer_impl.h tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp Change-Id: Iae95c5778dc091058f16f6db76f04a0178a9e809
| | * Revert "Release left button before showing the popup context menu"Eskil Abrahamsen Blomfeldt2019-10-213-19/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This partially reverts commit 5e8b16f0e4247cc978b08480450526cfa3b25029. Releasing the mouse button synthetically made it impossible to use tap and hold gestures. When investigating, it seems that other changes have fixed the original issue that 5e8b16f0e4247cc978b08480450526cfa3b25029 was meant to address, so this is no longer needed. [ChangeLog][Android] Fixed regression that made it impossible for an application to use the tap-and-hold gesture. Fixes: QTBUG-72408 Change-Id: I53f687d047a4ad0fdf3c8c96a00ed1b11d09f047 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| | * Cocoa: Update the PPK_PrinterName property if one is explicitly setAndy Shaw2019-10-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | When a QPrinterInfo is passed in to the QPrinter then it needs to ensure that the underlying session is set up to use the specified printer, otherwise it uses the default one as it has not been changed. Change-Id: I90012223e9831303d02fd3ffc68223dc492ece0c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-223-35/+24
|\| | | | | | | | | | | Change-Id: Ic062a5bd62621877b17cc0d47303b3c879241385
| * | Propagate application termination requests through QPATor Arne Vestbø2019-10-193-23/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of having each platform plugin deal with application termination in their own weird ways, we now have a QPA API to signal that the system requested the application to terminate. On the QGuiApplication side this results in a Quit event being sent to the application, which triggers the default behavior of closing all app windows, and then finally calling QCoreApplication::quit(). The quit event replaces the misuse of a close event being sent to the application. Close events are documented as being sent to windows. The close events that are sent to individual windows as part of the quit process can be ignored. This will skip the final quit() of the application, and also inform the platform that the quit was not accepted, in case that should be propagated further. In the future the logic for closing windows should be unified between the various approaches in closeAllWindows, shouldQuit, and friends. Change-Id: I0ed7f1c0d3f0bf1a755e1dd4066e1575fc3a28e1 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | macOS: Merge [QCocoaApplicationDelegate canQuit] into callsiteTor Arne Vestbø2019-10-191-30/+24
| | | | | | | | | | | | | | | | | | | | | | | | The logic for handling termination without any event loops has been moved up as an early exit, and the code has been modernized. Change-Id: I202720b9923e35732cffea656e1ce108ef11953d Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-191-22/+3
|\| | | | | | | | | | | Change-Id: I69f44ea7254cb2643a00b040bbb46f41b7f76a87
| * | macOS: Let system decide whether modal window should prevent app terminationTor Arne Vestbø2019-10-181-22/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic for preventing application termination when there are modal windows active was a leftover from the Carbon to Cocoa port, and is no longer needed. AppKit will deal with this on its own, by checking the preventsApplicationTerminationWhenModal property of each NSWindow. In some cases AppKit will also ignore this property, such as when quitting the application from the menu entry, which means we now get the default system behavior for this use-case. Change-Id: Iac5d8d8e17eb0974448f7ee6f39c9b7761bf4d90 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-181-2/+0
|\| | | | | | | | | | | Change-Id: I4fbbf100b673ab100997dbf2f42bf195dc3c050f
| * | macOS: Don't dismiss menu during applicationShouldTerminateTor Arne Vestbø2019-10-161-2/+0
| | | | | | | | | | | | | | | | | | | | | The logic was a leftover from the Carbon days and is no longer needed. Change-Id: I557b669eadea902fa439c43162218c5864077df9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-1629-150/+88
|\| | | | | | | | | | | Change-Id: Ifd83db69416230175ddc3161f640b612755018fc
| * | macOS: Simplify Objective-C namespacingTor Arne Vestbø2019-10-1527-112/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We only need to use the QT_MANGLE_NAMESPACE macro when declaring the interface of the class. As long as we couple that with an alias declaration using QT_NAMESPACE_ALIAS_OBJC_CLASS, any further uses of the class name can be un-namespaced, including declaring categories on the class. The only snag with QT_NAMESPACE_ALIAS_OBJC_CLASS is that it can only be used once per class and translation unit, so forward declarations get hairy, but we can avoid that by just including the headers instead. Change-Id: I333bcd18fe1e18d81fbd560b0941c98b1c32460e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | Win32: Consolidate registry codeFriedemann Kleint2019-10-142-38/+15
| | | | | | | | | | | | | | | | | | | | | | | | Add a RAII class for registry keys and use it throughout the code base. Change-Id: I666b2fbb790f83436443101d6bc1e3c0525e78df Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-136-55/+57
|\| | | | | | | | | | | Change-Id: I9953c1ca16862184c2373027e946c482ce8e6f0e
| * | macOS: Optionally flush sub-layers via sub-image copies of the backingstoreTor Arne Vestbø2019-10-111-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we're flushing the backingstore to sub-views with their own layers we don't want to pay the cost of uploading the whole backingstore to the GPU in the case where we're dealing with a discrete GPU. To work around this we make a copy of the appropriate part of the surfcace. This results in additional copies of the data, and will need further investigation to limit these. Task-number: QTBUG-77447 Change-Id: I318ae80e433dd7b0a55fd5a598b19f114d8bd28e Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * | macOS: Don't override event handler for kAEQuitApplicationTor Arne Vestbø2019-10-111-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of the default handler, [NSApp _handleAEQuit], does a lot more than just terminating the application, including sending NSWorkspaceWillPowerOffNotification if appropriate, and deals appropriately with state restoration. Change-Id: If725838fc0f40d09a0b8885eb3e7239499d8fea0 Fixes: QTBUG-18624 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| * | macOS: Simplify reflection delegate handling in QCocoaApplicationDelegateTor Arne Vestbø2019-10-111-25/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sending a message to a nil object returns nil, so there's no reason to check the delegate before calling respondsToSelector, and we can use the implicit _cmd argument to pass along the selector for the method we're in. For applicationShouldTerminate, if there's a reflection delegate but it doesn't answer to applicationShouldTerminate it makes no sense to skip our own logic. Change-Id: Iafcd883a5c8cec1b35d2f95238de55eff060d71f Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * | Merge "Merge remote-tracking branch 'origin/5.13' into 5.14"Liang Qi2019-10-103-3/+15
| |\ \
| | * | Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-10-103-3/+15
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbscreen.h src/src.pro Change-Id: I4e1981e69a1ddcbe4078ec6ab2a64b0da6a445de
| | | * Blacklist Desktop GL for Mobile Intel 4 Series Express ChipsetMichael Brüning2019-10-071-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using desktop GL with this graphics card causes crashes e.g. when using Qt WebEngine. Fixes: QTBUG-58772 Change-Id: I90e12aab4475c17be262e391ff0989cebf0b3ec4 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | | * Xcb: fix rounding error in reporting screen refresh rateKirill Burtsev2019-10-042-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Screen refresh rate might not be just integer but with decimal part like, for example, 59.97 Hz. Fix calculation from raw xcb data and its store type as it is qreal already for QScreen::refreshRate API. Task-number: QTBUG-73911 Change-Id: Ia0494e953176c2854f0ed42c4498a29cfef16106 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | | Windows QPA: Improve reliability of clipboard retrievalFriedemann Kleint2019-10-101-4/+13
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clipboard retrieval sometimes fails due to the other application having the clipboard locked. Retry opening the clipboard. The choice of parameters is empirical, they have been observed to prevent failures for MS Office applications at least. Fixes: QTBUG-53979 Change-Id: Icbcaee149f0d377f33b222cdafbb2a21a7f1cf9d Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-091-3/+3
|\| | | | | | | | | | | Change-Id: I03d82c5bc47908a97e7a908d7e67a7301b28d8cb
| * | macOS: Pass required parameters to NSOpenSavePanelDelegate callbacksTor Arne Vestbø2019-10-081-3/+3
| | | | | | | | | | | | | | | | | | Change-Id: I0e0322734a077e4ee948128f3ba6c074514ccbb9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-051-8/+5
|\| | | | | | | | | | | Change-Id: I554a2762890391b3b6013c8b82211a8386a4ced8
| * | Modernize QWindowSystemInterface::handleCloseEventTor Arne Vestbø2019-10-041-8/+5
| | | | | | | | | | | | | | | | | | | | | The base WindowSystemEvent has had an eventAccepted flag since 2014. Change-Id: Ia0aa795083cd98ece83a4c1cc010d3a25e2489fd Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-046-192/+194
|\| | | | | | | | | | | Change-Id: I43393cf47675fd6c14972df1221986335c6f493c
| * | QPainter: don't print deprecated warnings for HighQualityAntialiasingChristian Ehrlicher2019-10-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Add pragmas to not print warnings about the usage of the deprecated warnings inside QtCore. Change-Id: I2cd9f111cdf13cddff527ab3bac7fa80417d1445 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | Export lcEventDispatcher in private namespaceTor Arne Vestbø2019-10-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The category is used outside of QtCore, and needs to be exported for shared library builds. Change-Id: I9bba477d37b823146eaec4e1e53197651f09c013 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | Android: Do not extract QML assets dataBogDan Vatra2019-10-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead to extract the assets QML file, we create a .rcc bundle file which is register by android qpa plugin before the it invokes the main function. Thsi way we avoid extracting the QML files from assets as they can be accessed directly from resources. [ChangeLog][Android] Instead of bundling QML resources in assets and extracting them on first start, Qt now creates an .rcc file and register it before invoking the main function. Change-Id: Icb2fda79d82c5af102cc9a0276ff26bb0d1599e8 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * | Android: rework assets supportBogDan Vatra2019-10-024-192/+184
| | | | | | | | | | | | | | | | | | | | | The new version fix QDirIterators and it lists all the files and dirs. Change-Id: I5a30eedb61ab2397a84365d00f308cda0c194de2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Qt Forward Merge Bot2019-10-016-98/+191
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-016-98/+191
| |\| | | | | | | | | | | | | | Change-Id: I77ba01f09b3dbcaf13cb265a70d9da661c32a61f
| | * | Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-304-38/+44
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qrandom.cpp src/corelib/io/qfileinfo.cpp src/corelib/kernel/qeventdispatcher_win.cpp src/corelib/kernel/qeventdispatcher_win_p.h src/gui/text/qfontdatabase.cpp src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm src/plugins/platforms/windows/qwindowsglcontext.cpp src/testlib/qtestcase.cpp Done-With: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Done-With: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4893212471aa24be804c989a581810e2f714545c
| | | * Fix robustness detection for windowsAllan Sandfeld Jensen2019-09-272-32/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes detecting requested robustness for OpenGL < 4.0. Fixes: QTBUG-78781 Change-Id: I6a10f3ed925dd05d5caa7d6b6e12935e27eed3e9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | | * Move DialogButtonBoxLayout case to be before MouseDoubleClickDistanceAndy Shaw2019-09-241-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This amends 9be66cb282dee1ce4380602a2f3caf5abfd144cf so that the DialogButtonBoxLayout case is moved to be before the MouseDoubleClickDistance one in case the fallthrough is triggered. Change-Id: I843dad6b55ccffe6b6c275cd75587f04659e512f Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| | | * Windows QPA: Fix close button not working on Windows 7Andre de la Rocha2019-09-231-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A previous change modified hit testing in the non-client area of fixed-size windows, in order to prevent showing a resize cursor when the windows are not resizable (QTBUG-77220). The change assigned HTCAPTION for any point over the entire title bar, including the top bar buttons, which on Windows 7 classic or basic desktop caused these buttons to become unresponsive. The present fix changes this behavior to redefine only the outer sizing frame, while letting the rest of the title bar be handled by DefWindowProc(). Fixes: QTBUG-78262 Change-Id: Id6e821a805c8333a67988f87c3727bed0c93290e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>