summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Merge remote-tracking branch 'origin/5.15' into dev"Qt Forward Merge Bot2020-04-271-2/+4
|\
| * Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-271-2/+4
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/text/qstringliteral.h Change-Id: I1665af3ce537471b249def5e080b39bd4105189e
| | * macOS: Don't optimize out aggressive backingstore flushes when single-bufferedTor Arne Vestbø2020-04-221-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Comparing the layer contents to the backingstore surface doesn't make sense when we're single buffered since we're always using the same surface. And once Core Animation has picked up on the surface it's not enough to just keep drawing to it, we also need to tell Core Animation that the contents has changed. Change-Id: I517a0b7a3ba7e9d96033465c9bd5a192985643ac Fixes: QTBUG-81071 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | | CMake: Regenerate projects to match updated plugin APILeander Beernaert2020-04-2725-25/+25
|/ / | | | | | | | | Change-Id: Iafe0a953e74d7f36ec48fa075b3725dd6466c5e3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Remove the QTextCodec dependency from the xcb pluginLars Knoll2020-04-244-23/+15
| | | | | | | | | | Change-Id: Ic9f4cec4aa7270b8d9e16c345d060d7d820319d3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Remove deprecated ApplicationAttribute enum valuesVolker Hilsheimer2020-04-241-1/+0
| | | | | | | | | | | | | | | | In the declaration, leave them in as comments so that the gaps in the numbering of the values doesn't create confusion. Change-Id: I92ff299416896c471e7c7d80b988cd4642b6b756 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.15' into dev"Qt Forward Merge Bot2020-04-2249-529/+181
|\ \
| * | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-2249-529/+181
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/widgets/widgets/qabstractbutton.cpp src/widgets/widgets/qbuttongroup.cpp src/widgets/widgets/qbuttongroup.h src/widgets/widgets/qsplashscreen.cpp tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp tests/benchmarks/opengl/main.cpp Needed update: src/plugins/platforms/cocoa/CMakeLists.txt Change-Id: I7be4baebb63844ec2b3e0de859ca9de1bc730bb5
| | * Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2020-04-201-1/+1
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt_common.prf src/network/ssl/qsslsocket_openssl_symbols.cpp src/network/ssl/qsslsocket_openssl11_symbols_p.h src/network/ssl/qsslsocket_opensslpre11_symbols_p.h src/plugins/platforms/wasm/qwasmeventdispatcher.cpp Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io> Change-Id: I04fb3139a0e2efd4bc2f0959f131679f192fa0f8
| | | * wasm: do not try to resume main thread if mainloop has not started yetLorn Potter2020-04-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit d928beb024c240b37d35d2c53f25648c99a484b4) Fixes: QTBUG-83293 Change-Id: Ibd891629d1d023e47d196dd60821cc5c583a178d Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
| | * | Introduce QSocketNotifier::activate(QSocketDescriptor, QSN::Type)Mårten Nordheim2020-04-165-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pre-existing overload passes an int, but this can mean the descriptor gets truncated in compilations where the descriptor is 64-bit. The old overload with int is visible when querying the metaobject system so string-based connects still work as before, and connecting to it will produce a deprecation warning in the output. At the same time the PMF-based connect will, on recompile, pick the QSocketDescriptor overload. As an added improvement it also comes with the notification type, removing the need for separate slots where the code would be mostly shared anyway. The QSocketDescriptor type can be implicitly converted to and from qintptr to ensure existing code still compiles. It can also be constructed from Qt::HANDLE on Windows. In this same patch I also update the existing string-based connects in this module, which then includes updating the parameters for some slots as well. [ChangeLog][QtCore][QSocketNotifier] Added QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type). This replaces the activated(int) signal which in 64-bit environments could truncate the socket descriptor. If you use "activated" with the string-based connect() then you need to update the parameter type of the signal and slot if it had one. If you use it with the pointer to member function based connect() then all you need to do is update your slot's parameter type if it has one. If you need to compile your source code with multiple versions of Qt then connect() to this function using pointer to member function and update the slot's parameter type if needed. Task-number: QTBUG-70441 Change-Id: Ic43d6bc4c5bcb4040867b2ffad8d36fb01eed8af Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| | * | macOS: Remove a bunch of dead (forward) declarationsTor Arne Vestbø2020-04-1519-270/+25
| | | | | | | | | | | | | | | | | | | | Change-Id: I402668a17b48c164658f775bacd832615a6d2587 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | macOS: Clean up header includes to use quotes or brackets as appropriateTor Arne Vestbø2020-04-1512-47/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The includes can be sorted and unified even more, but that's left for another rainy day. Change-Id: I4d5670d6d8389f69d2631b83b8f421d1f685a0f9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * | Windows QPA: Fix geometry when firing a full exposeFriedemann Kleint2020-04-152-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several places in the code where a full expose event is fired, but the geometry in logical coordinates is used (pre-dating High DPI scaling). Fix by introducing a helper function for it. Task-number: QTBUG-83449 Change-Id: Ie8bb306de0b9b2b85306ed1bb6ba71181b76a958 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * | Windows QPA: Fix showing translucent windows maximized/full screenFriedemann Kleint2020-04-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Translucent (layered) windows require an additional expose event. This was sent with the wrong size since the order of handleGeometryChange(), handleWindowStateChange() in handleResized was wrong. Fixes: QTBUG-83449 Change-Id: Iafd3fa8c0893aa28079201f73b7eb529087ba079 Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * | Windows QPA: Fix restoring from fullscreen in High DPI setupsFriedemann Kleint2020-04-151-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic for checking whether the saved geometry (native pixels) is still within a screen compared them against logical coordinates. Work with the platform screen geometry instead. Fixes: QTBUG-83448 Change-Id: Ib68f967d1a33a490f88a7bec6dcc788788a10389 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * | Fix deprecation warnings in QCocoaCursorVolker Hilsheimer2020-04-142-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Explicitly use the Qt APIs that return QPixmap and QBitmap by value, and fix the API taking those to use const references rather than pointers or const values. Change-Id: I2bb7ad1edb3b65f806f0475fca383e5b9bdb61f3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit b61ea367a5f8d07afda36b49b039b2375142d7f4) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * | macOS: Replace foreach with ranged for loopsTor Arne Vestbø2020-04-149-10/+12
| | | | | | | | | | | | | | | | | | | | Change-Id: I9d0dbb60e05e4ef85219740465bb941ef8d8eb0f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | macOS: Move translations to their respective source filesTor Arne Vestbø2020-04-147-192/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lupdate can deal with Objective-C++ sources nowadays, most likely due to appending them to SOURCES instead of the deprecated OBJECTIVE_SOURCES. Task-number: QTBUG-30125 Change-Id: Ifc6b06f13e0f679a011d999f11c2e6d25dcf27ed Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | | Windows QPA: Fix High DPI scaling not becoming active when changing scalingFriedemann Kleint2020-04-221-0/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When changing scaling from 100%, at which High DPI scaling is inactive, to something larger, High DPI scaling does not become active. Update the factors when screens are refreshed. Pick-to: 5.15 Task-number: QTBUG-77302 Task-number: QTBUG-77136 Task-number: QTBUG-82267 Change-Id: Iebbc29ced2f23af9db4d67839458848245e2db1d Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | windows: Add QT_NO_OPENGL_BUGLIST environment variableLaszlo Agocs2020-04-211-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The typical approach of setting QT_OPENGL_BUGLIST to a non-existing file is neither documented nor is very friendly. Instead, add a QT_NO_* style of variable that skips reading the JSON config file altogether. This can then be used in more exotic, possibly virtualized, environments to disable the driver and adapter discovery, and instead assume that OpenGL is available and fully usable. Task-number: QTBUG-82372 Pick-to: 5.15 Change-Id: I192baa83c5d9760ee27873385a246fef87421b16 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | Get rid of QT_OPENGL_ES*Eskil Abrahamsen Blomfeldt2020-04-173-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QT_OPENGL_ES* macros are leftovers from an earlier, ad hoc configuration system, which has since been replaced by QT_CONFIG. To clean things up in Qt 6, we use the new way instead. Task-number: QTBUG-83467 Change-Id: I578dc7695bff9d5ee303b22e44f60fee22fe0c28 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-112-5/+7
|\| | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/network/socket/platformsocketengine/platformsocketengine.pri Change-Id: I22daf269a8f28f80630b5f521b91637531156404
| * | Minimal platform: fix leaking QMinimalScreen instanceShawn Rutledge2020-04-082-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This caused false alarms in fuzzing tests. The lifetime of the screen is the same as that of QMinimalIntegration. But failure to call handleScreenRemoved() also causes a warning; so as on "normal" platforms, the screen has to be separately allocated. Change-Id: Iad0cc53b8d09687400ced28bc2353b7500b01110 Reviewed-by: Robert Loehning <robert.loehning@qt.io>
* | | Windows: Provide a way to switch between WinTab and Windows Ink at run-timeAndre de la Rocha2020-04-105-4/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds the setWinTabEnabled() function to Qt Platform Headers, which allows an application to set at run-time whether the WinTab API will be used for tablet input instead of the native Windows Ink API. [ChangeLog][Windows] The setWinTabEnabled() function added to Qt Platform Headers now allows an application to set at run-time whether the WinTab API will be used for tablet input instead of the native Windows Ink API. Fixes: QTBUG-83218 Change-Id: I51d3c7316baeda136763cf37c2f54295905450ec Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | Change qHash() to work with size_t instead of uintLars Knoll2020-04-094-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is required, so that QHash and QSet can hold more than 2^32 items on 64 bit platforms. The actual hashing functions for strings are still 32bit, this will be changed in a follow-up commit. Change-Id: I4372125252486075ff3a0b45ecfa818359fe103b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-0844-143/+267
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/doc/src/cube.qdoc src/corelib/global/qlibraryinfo.cpp src/corelib/text/qbytearray_p.h src/corelib/text/qlocale_data_p.h src/corelib/time/qhijricalendar_data_p.h src/corelib/time/qjalalicalendar_data_p.h src/corelib/time/qromancalendar_data_p.h src/network/ssl/qsslcertificate.h src/widgets/doc/src/graphicsview.qdoc src/widgets/widgets/qcombobox.cpp src/widgets/widgets/qcombobox.h tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro tests/manual/diaglib/debugproxystyle.cpp tests/manual/diaglib/qwidgetdump.cpp tests/manual/diaglib/qwindowdump.cpp tests/manual/diaglib/textdump.cpp util/locale_database/cldr2qlocalexml.py util/locale_database/qlocalexml.py util/locale_database/qlocalexml2cpp.py Resolution of util/locale_database/ are based on: https://codereview.qt-project.org/c/qt/qtbase/+/294250 and src/corelib/{text,time}/*_data_p.h were then regenerated by running those scripts. Updated CMakeLists.txt in each of tests/auto/corelib/serialization/qcborstreamreader/ tests/auto/corelib/serialization/qcborvalue/ tests/auto/gui/kernel/ and generated new ones in each of tests/auto/gui/kernel/qaddpostroutine/ tests/auto/gui/kernel/qhighdpiscaling/ tests/libfuzzer/corelib/text/qregularexpression/optimize/ tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/ tests/libfuzzer/gui/text/qtextdocument/sethtml/ tests/libfuzzer/gui/text/qtextdocument/setmarkdown/ tests/libfuzzer/gui/text/qtextlayout/beginlayout/ by running util/cmake/pro2cmake.py on their changed .pro files. Changed target name in tests/auto/gui/kernel/qaction/qaction.pro tests/auto/gui/kernel/qaction/qactiongroup.pro tests/auto/gui/kernel/qshortcut/qshortcut.pro to ensure unique target names for CMake Changed tst_QComboBox::currentIndex to not test the currentIndexChanged(QString), as that one does not exist in Qt 6 anymore. Change-Id: I9a85705484855ae1dc874a81f49d27a50b0dcff7
| * | qpa: Remove references to lighthouseTor Arne Vestbø2020-04-0327-71/+3
| | | | | | | | | | | | | | | Change-Id: I37646113f626c878883cff49f4e186ec71bcfa15 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-03-272-25/+68
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/serialization/qcborvalue.cpp Change-Id: I539d8cae5fd413b8a6c9c5d8a6364c79c8133a0a
| | * macOS: Flush sublayers via separate IOSurface backingstoresTor Arne Vestbø2020-03-252-25/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Flushing sublayers via QImage copies of the root IOSurface was causing performance regressions due to the constant allocations of new images each frame. We now re-use the QCALayerBackingStore implementation for sublayers, which gives a dynamic swap-chain. We're still paying the CPU cost of the copy from the root backingstore to the layered backingstores, as well as the memory cost, but at least improves the situation. We do not try to be smart and paint directly into the sublayers, as that would leave the root backingstore stale, potentially causing glitches when views are repositioned. Investigating this is left for future work. Fixes: QTBUG-82986 Change-Id: I758a3d8e1e40e2ed4fe6bc590a4a5a988d87a3a7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit ce2d68ebe1aefeae78ff2fd8ec5ff7e20790ef69)
| * | Windows QPA: Enable Toggle UIA pattern for all checkable controlsAndre de la Rocha2020-03-261-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change allows the checked/unchecked state to be detected by screen readers for all controls with a checkable state. Task-number: QTBUG-81919 Change-Id: I604151397b4ae21297009c274ffe634723ebe783 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | wasm: add braces around multiline else caseMorten Johan Sørvig2020-03-261-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From clang warning: qwasmcompositor.cpp:335:13: warning: misleading indentation; statement is not part of the previous 'if' [-Wmisleading-indentation] offset += (delta +delta); Change-Id: Id372dfdd8fda1c705c61a24c26843dfb33fba40c Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
| * | wasm: Add OpenGL version checkMorten Johan Sørvig2020-03-242-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QtQuick3D probes for the supported OpenGL level by testing multiple OpenGL versions in descending order. Context creation must fail for versions not supported by WebGL. It does not appear that Emscripten does this for the 3.x minor versions, at least. Add version check which allows OpenGL (ES) 3.0 and 2.0. Change-Id: Ide8745dd79e69af86812a8d6f5d6cc16ecdd099a Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2020-03-244-7/+118
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/xcb/qxcbdrag.cpp Change-Id: I0b47324b70b0b4894e54b21aa3e7a5041f9bd5e3
| | * xcb: Add support for XdndActionList propertyAlexander Volkov2020-03-234-7/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows to pass and receive possible drop actions from other processes, including GTK applications. Fixes: QTBUG-75744 Change-Id: I944edc6fa00f8801a25912e70eb104a647a9fc0e Reviewed-by: JiDe Zhang <zccrs@live.com> Reviewed-by: Liang Qi <liang.qi@qt.io>
| * | QXcbCursor: Replace deprecated QCursor APISze Howe Koh2020-03-241-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Align with e79a6253813cd67954e371805da547c48ea32d3d in qtbase. Task-number: QTBUG-48701 Change-Id: Ia3ca2de6bbf4e9c1738f77193351dd95a14dd2dc Reviewed-by: Liang Qi <liang.qi@qt.io>
| * | Deprecation warnings: replace qrand with QRandomGeneratorVolker Hilsheimer2020-03-232-2/+6
| | | | | | | | | | | | | | | Change-Id: I80fe6f611b367c6c8a1b77e82dc791493f88929b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Mitch Curtis2020-03-201-0/+1
| |\| | | | | | | | | | Change-Id: Ib2a2e3a292af43be3a980c2ccc943c08f4bbf72f
| | * Merge remote-tracking branch 'origin/5.14.2' into 5.14Mitch Curtis2020-03-191-0/+1
| | |\ | | | | | | | | | | | | Change-Id: I34ca28c75b88e882c3f35f182bf01acb22b77637
| | | * Merge 5.14 into 5.14.2Kari Oikarinen2020-03-105-5/+25
| | | |\ | | | | | | | | | | | | | | | Change-Id: Ib4b26bad47a850cde6253fb3422aae34b2cf622b
| | | * | Windows QPA: Do not play sound for QMessageBox::NoIconFriedemann Kleint2020-03-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends 2f366a63b20a943ae3099605c2cdb34009ca5602. Task-number: QTBUG-82682 Task-number: QTBUG-81342 Change-Id: I30f465bf432e27828db460f6dbbb59eee0cca8f2 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io>
| * | | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-03-186-22/+44
| |\| | | | | | | | | | | | | | | | | | Change-Id: Iaab37b633a8286c2c21425aaac34d30529a3ea82
| | * | | WinRT: Open the URLs via the XAML thread to enable them to be openedAndy Shaw2020-03-141-12/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UWP expects these functions to be opened via the XAML thread, so we ensure this is done by running those functions on that thread. Change-Id: I57ae3a7d9b45d0b1a00ac23b103386bd34b65c6d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| | * | | Windows QPA: Fix broken frame geometry when moving windows with native menusFriedemann Kleint2020-03-135-10/+23
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWindowsWindow::updateFullFrameMargins() which is called from the screen changed handling does not take native menus into account. Since the size of the menu is not known when using EnableNonClientDpiScaling(), obtaining the correct frame size requires triggering a WM_NCCALCSIZE message. Extract the helper forceNcCalcSize() from QWindowsMenu and use that from updateFullFrameMargins() in case menus are present. Amends d2fd9b1b9818b3ec88487967e010f66e92952f55. Fixes: QTBUG-82580 Change-Id: I306f1faf84e26c88608cb22ffd42eccc848905c3 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* | | | Resolve QWidget window handle without depending on QtWidgetsTor Arne Vestbø2020-04-021-15/+10
| | | | | | | | | | | | | | | | | | | | Change-Id: If5b2f17283193d7a1718f476b72f380e9e67d0f0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | | Android: Implement MaximizeUsingFullscreenGeometryHintEskil Abrahamsen Blomfeldt2020-03-308-107/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (This reintroduces c17a5cec1901dd23f4c39ec2ae47a060fbb06895, which was reverted in Qt 5 because it requires API level 23.) This flag tells the app to use as much of the screen as possible while still keeping system UI visible, and can be supported on Android by using translucent system UI, similar to iOS. What this does: 1. It changes the current fullscreen/not-fullscreen logic to allow three states: fullscreen, fullscreen with translucent decorations and not-fullscreen. 2. In order for it to work, we have to send the actual screen geometry and available geometry, at least in the case where the user needs to know the available geometry to know the safe area of the window. So we get the real screen metrics and pass these to the QPA plugin (API level 17, so we can do that now that the minimum version is 21.) 3. Note that getting the insets and calculating the useable area does not work for non-fullscreen windows, since Android is quite inconsistent in this respect. So in this case we just use the window size and origin of 0,0 for the available geometry. 4. Since we are touching this code anyway, this patch also tries to use more consistent wording (calling it "available geometry" everywhere instead of desktop geometry in some places and just geometry in others, etc.) [ChangeLog][Android] Qt::MaximizeUsingFullscreenGeometryHint window flag is now supported, and will make the window fullscreen, but keep the system UI on-screen, with a translucent background color. Fixes: QTBUG-74202 Change-Id: I4cc5ef9cc2a3bd22d4d8d2bb767c6ff8a3aa75c0 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | | | Fix deprecation warnings in QCocoaCursorVolker Hilsheimer2020-03-302-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Explicitly use the Qt APIs that return QPixmap and QBitmap by value, and fix the API taking those to use const references rather than pointers or const values. Change-Id: I2bb7ad1edb3b65f806f0475fca383e5b9bdb61f3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* | | | macOS: Fix or ignore deprecated API in 10.14Tor Arne Vestbø2020-03-278-32/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-82128 Change-Id: I11abfcf7f245a7a25733625b50e207b07abba289 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | | Fix deprecation warnings from NSColor(Space) with macOS 10.14 SDKVolker Hilsheimer2020-03-231-27/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The support for handling color spaces by names is deprecated in recent AppKit versions, and should be replaced by using NSColor.type, and operations on the type-specific properties of the color. Merge the two implementations from qcoregraphics.mm and qcocoacolordialoghelper.mm, which also fixes the inconsistent interpretation of color components as device dependent (in qcoregraphics) or generic (in qcocoacolordialoghelper). We now always populate the QColor with device independent components. Change-Id: Id79c609736ff1962bebe4bd7158781a6d1b4475e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | | CMake: Regenerate projects and adjust after old harfbuzz removalAlexandru Croitor2020-03-171-0/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: I3a00334f2b29caa739d6a1d8edd4c7311dda812f Reviewed-by: Lars Knoll <lars.knoll@qt.io>