summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QAbstractItemDelegate: tolerate that editor gets reparentedv6.4.0-beta4Volker Hilsheimer2022-08-251-2/+3
| | | | | | | | | | | | | | | | | | | | An item delegate might override destroyEditor to merely reparent the existing editor out of the item view for later reuse, rather than actually destroying the editor. As of d0dffdfc012574da4a75241097b667d09bb39ba2, the code calling closeEditor() - which calls destroyEditor - might explicitly set focus back to the item view parent of the editor. This needs to handle that the parent of the editor might no longer be valid after the closeEditor call returns, and rather store the old parent widget explicitly. Add a test case that segfaults with nullptr access without the fix. Fixes: QTBUG-105231 Change-Id: I04a355673823c4941865f7a575864e991ceeb5f0 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 52f4d0b0d2a29a08e55293664bf1c8002cad0d17) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qt_fusionPalette: make links more legible on dark backgroundsMitch Curtis2022-08-251-2/+7
| | | | | | | | | | | | | | QPalette's default for Link is Qt::blue, which is difficult to read on dark backgrounds. Use the same blue that is already used for Highlight, as it is consistent and easy to read. Task-number: QTBUG-90504 Change-Id: Ic7aceafb2bd0e57b65448917c352e3551ad26610 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 502c47820a3285b3b3c85365a9843aeb7b76235d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: don't use full paths for X11 SM and ICE libsSamuli Piippo2022-08-242-2/+3
| | | | | | | | | | Full paths were recorded into INTERFACE_LINK_LIBRARIES which could point to temporary build directories. Change-Id: I883fd8f652e4d9ecd7d8e0076d62f5c7f4e14ec9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 52ebf31d2b97513b2e3f9b46c99e60249d2b61fe) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Re-create TLW's window only when its surface type is really changedIlya Fedin2022-08-241-1/+1
| | | | | | | | Fixes: QTBUG-105017 Change-Id: If5826172efb53b6df15dd3b7ba91b09d733cc77f Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit a4a51f6a641f4bf0a863251d6d3e026d81de6280) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Make sockets' accept() methods return qintptrMårten Nordheim2022-08-2410-19/+19
| | | | | | | | | | | | Not necessarily relevant outside windows, where the socket descriptor is SOCKET (= unsigned 64-bit). Also follow their recommendation to not compare to -1, but rather to INVALID_SOCKET. Change-Id: I0cfa4dfd9e147469132e2e72de22b30eab01e15c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit da9d60ecc32263eaf77882811d58fefad9f85dc9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Remove "Container keywords" section from containers.htmlKai Köhne2022-08-241-23/+1
| | | | | | | | | | | | For foreach, we just mention that it is deprecated, and forever is not actually directly related to Qt containers. Both macros are also documented in qglobal.cpp, and the section title is not referenced anywhere so this patch won't break any links. Change-Id: I6c3e11b205237e5b502173f2216606adf5812f55 Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 4b3cb1329a36448bc636c9e43ed53b8b9e102acd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Remove qmake-only reference in Q_IMPORT_PLUGIN descriptionKai Köhne2022-08-242-9/+3
| | | | | | | | | | | The Static Plugins page describes handling of qmake and CMake already in greater detail. No need to replicate it here. Task-number: QTBUG-88044 Change-Id: I2cae85c0b0d20585b563bab9e263121181adeb8c Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 836b2ae1e6c76775b38eb59f0b01c66a83a0fe9a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Remove mentioning of variadic macrosKai Köhne2022-08-241-2/+1
| | | | | | | | | | We don't support compilers without variadic macros anymore; the check in code was removed already in commit 4628e5cded8. Change-Id: Ica4d0b2f7055e3d00ae780e23eb4e5a9d2dcc191 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit f9cd4a02904e860e6a3dc29ad942098e1c1ab6a8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Generalize info about -rdynamic to be not qmake specificKai Köhne2022-08-241-1/+4
| | | | | | | | Fixes: QTBUG-88044 Change-Id: I079cb75b5a5c32e38dec73474c967cc836d94b68 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 54e01d50f44044e6b8d7a26a8f095702c6739bdf) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Make QHeaderView restore state from different stream versionsAxel Spoerl2022-08-241-14/+28
| | | | | | | | | | | | | | | | | | | | If restoring a QHeaderView state from a data stream with version Qt_5_0, check alignment and resize mode properites for out-of-bound values. If out of bounds, try QDataStream version Qt_6_0, which is used by KDE apps compiled with 5.15.2 or 6.2.3. QFileDialog stores settings in the same settings file across different Qt versions, using different QDataStream versions. That makes QFileDialog vulnerable to the issue (QTBUG-104962). A respective auto test is added with this patch. Fixes: QTBUG-104962 Task-number: QTBUG-104425 Change-Id: I666207fca7ab837ad27a247e504a40757ee8afab Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 854cb55987b3de3c8379db0e7e95b4c94d4e6588) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Fix Android build for CMake < 3.19Joerg Bornemann2022-08-241-4/+5
| | | | | | | | | | | | The Android build used cmake_language(DEFER) and guarded with a check for CMake's version being >= 3.18. However, cmake_language(DEFER) was introduced in CMake 3.19. Fix that version check. Fixes: QTBUG-105841 Change-Id: Ic318c104cf212de4c97c5a89b73536609826fd5b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit e38c7618be50e16b51cc8afdab52ffb26ed76b0c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Account for dark system themes in qt_fusionPaletteMitch Curtis2022-08-242-42/+43
| | | | | | | | | | | | | | | | | | | | | | | | On Ubuntu (Gnome), the Fusion style didn't account for when a dark theme was set in the system's settings. Neither QGtk3Theme, nor QGnomeTheme (which it derives from) provide a palette() implementation, so they'd fall back to QPlatformTheme's. This default implementation calls QPlatformThemePrivate::initializeSystemPalette(), which uses qt_fusionPalette(). This patch accounts for QPlatformTheme::appearance() in qt_fusionPalette(), adjusting the palette roles accordingly to look correct when run under a dark theme. This also fixes the same issue for the Fusion style in Qt Quick Controls. Fixes: QTBUG-90504 Task-number: QTBUG-99276 Change-Id: Id096bf809ef7a63dc440b5a68283e123173e917e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 9c66af1f1d2cb8d25546d544e22fd7647227214e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Allow for CMAKE_INSTALL_BINDIR set to . in deployment APIJoerg Bornemann2022-08-241-1/+1
| | | | | | | | | | | | | | | Esp. on Windows, it can be desirable to deploy an application and its DLLs directly in the install prefix, without a bin directory. To do that, one must set CMAKE_INSTALL_BINDIR to ".", but that resulted in a faulty prefix entry in the generated qt.conf. Check for this case when generating qt.conf to write the correct prefix. Fixes: QTBUG-105583 Change-Id: I0e8295c70b48b991c19f58f6b3f2ed132112dd29 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 2f7a78cd7b3351bc7a1a209d0822769d111f246b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* iOS: use NSProcessInfo to resolve timestamps in simulator buildsRichard Moe Gustavsen2022-08-241-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | We currently build Qt for simulator using X86_64, even on ARM based macs. This results in the simulator running on ARM, while the app is running inside it using Rosetta. And with this combination, the event.timestamp, which is documented to be in seconds, looks to be something else, and is not progressing in sync with a normal clock. Sending out mouse events with a timestamp that doesn't follow normal clock time will cause problems for mouse-, and pointer handlers that uses them to e.g calculate the time between a press and release, and to decide if the user is performing a tap or a drag. For that reason, we choose to ignore UIEvent.timestamp under the mentioned condition, and instead rely on NSProcessInfo. Note that if we force the whole simulator to use Rosetta (and not only the Qt app), the timestamps will progress normally. Fixes: QTBUG-105810 Change-Id: Ib4e60593cac3230567ebc53d634f434fcefc98d0 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 0250f9364fbf31950601bf27c2a93c520c4abd80) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Disable resizing only when explicitly askedMikolaj Boc2022-08-241-3/+2
| | | | | | | | | | Do not assume that popups are unconditionally non-resizable. Only disallow resizing if explicitly asked by minimum/maximum size match. Change-Id: Ia8e3e4d074e4dc24b0ae4be56858e0d833eeebdb Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit a4c0e442e5f4f3ca2ed8ea81883db31e464a0209) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Mac: close popups when the user clicks into the menubarVolker Hilsheimer2022-08-231-0/+7
| | | | | | | | | | | | | | Otherwise it is possible to have a context menu and a menu from the menu bar open at the same time. Native applications close the context menu, but also block the click into the title bar. This change only closes popups, the click goes through to the menubar. Task-number: QTBUG-105474 Change-Id: I664c00eea83ba8fb43cc8a630d787f2d2b5b96ff Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 03144190dfa329444d8941781d20265dfe7ce59c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Mac: close popups opened on inactive application on relevant user actionVolker Hilsheimer2022-08-233-1/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On macOS, users can right-click into an inactive application to open a context menu without activating the application. Qt handles a number of events to close open popups (window deactivating or a mouse press outside the popup), but none of those will get called when the application is already inactive. So the popup might stay open (and on top of the window stack) when the user clicks into other applications, or activates another window. To fix this we need to watch for events outside of the Qt application on which we need to close the popup: when the user presses a mouse button, or activates another application using Cmd-Tab. But we don't want to monitor for key events, as that requires user permission. Use a global event monitor to watch for mouse presses, and an notification observer to watch for application activations, and respond by closing all popups (and removing the monitor and observer again). Use the monitor as well to watch for mouse moves, and pass only those events through the Qt event system so that mouse tracking in the menu works even if the application is inactive. This change brings back a version of the global event monitor we had in Qt 5.15. However, a press into our own menu will trigger the activation observer after the application became active, which would now close the menu. We don't want that, so we also need to remove the observer when the application becomes active (which makes sense anyway, as we will get regular events from then on). Fixes: QTBUG-105474 Change-Id: I18573fcda09a46c27730bd670a795f4d467aab01 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 5afb04d79ba246d9dca30c666511ce7505113ac5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix build without highdpiscaling featureIlya Fedin2022-08-231-0/+3
| | | | | | | | Fixes: QTBUG-104925 Change-Id: Ieb5dd2194c54a61733c427c8a0ddf7576147d6ea Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit c2bcba0d3cf550ede0488b40b8a5f81be817a65c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Deliver correct key code on key release on WASMMikolaj Boc2022-08-233-76/+69
| | | | | | | | | | | | | Changed the behavior in which key events are delivered to targets. Before the change, in case of a EMSCRIPTEN_EVENT_KEYUP event, the key code and text were not filled in correctly as they should. This resulted in wrong behavior when event targets expected these codes being available. Fixes: QTBUG-105213 Change-Id: Ie66b5d6d395d08af655fcb00f1f616ad43d6bea4 Reviewed-by: Lorn Potter <lorn.potter@gmail.com> (cherry picked from commit 74852139308b3798ffefbf94c62a056bdb1898c4) Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Remove qtnamespacemacros.h and use qtconfigmacros.h insteadSona Kurazyan2022-08-232-10/+0
| | | | | | | Change-Id: Ibae6e6e255c1bb1ee52839a051d585de81833bf9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 4842cc176881ae22e14ca193fba46c6a04d09530)
* Move PreselectFirstFileInDirectory theme hint from QGtk3Theme to QGnomeThemeIlya Fedin2022-08-222-2/+2
| | | | | | | | | It doesn't use any gtk API, so can live in QGnomeTheme Change-Id: Iff0391de6f01a03981f6e45b04fe9824fd2becfc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit cf6ab64f03723e254af9a28f431f076cffc7d54a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Windows QPA: fix tree item discovery through UI AutomationAndré de la Rocha2022-08-221-19/+11
| | | | | | | | | | | | | | | This change reverts a workaround for a compatibility issue with a Windows utility, which is no longer necessary with Qt6 and was in some cases preventing accessibility tools from discovering tree items. This reverts commit 1c55a6caf1fc2b8a73a9a756bcf6894c5d4e4398. Fixes: QTBUG-105814 Change-Id: Id464da49704b6953affca2fa40acc03f1ffd05ac Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit 62d957f6aab38f60f22c7e045a9710484f58ae4e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Refactor QWasmEventTranslator for added readabilityMikolaj Boc2022-08-223-127/+83
| | | | | | | | | | | | | | | | | | | | | | | | | Change listing: - change names of abbreviated structures/variables (e.g. KeyTbl -> WebToQtKeyCodeMappings) - add constants for commonly used magic strings ("Dead", StringTerminator) - use common idioms for common tasks (find_if, std::optional) - use binary search as facilitated by the sorted array instead of a full search - this optimizes the code at no cost - remove dead code (double translateEmscriptKey in QWasmEventTranslator::getKey, remove sticky dead key support as it was write-only, remove the dead setIsMac and g_usePlatformMacSpecifics, remove the dead getWindowAt). - cull the public interface on QWasmEventTranslator as some functions are only used internally (translateEmscriptKey) - simplify / shorten functions by short-circuiting - modernize definitions (= default) - auto-format the changes using clang-format The file is now much easier to read and understand. Change-Id: I5ea2bdafd9b9abc009feeb5516ddd87fb0ca212e Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit 784555cc2fa9d1625a4cac458c15d28cf0c1f4d7)
* CMake: fix the sorting order in CMakeLists.txtSona Kurazyan2022-08-221-1/+1
| | | | | | | Change-Id: I27c2140102bdf4831915337002974ab1987e2426 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 2df6fd5ea02be47d3fd604345bb8983183411ea1) Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Use the dead Mac path in QWasmEventTranslator::translateDeadKeyMikolaj Boc2022-08-222-3/+3
| | | | | | | | | | | The path for is_mac is unused. Use it by querying the platform from the new WASM plugin web platform API. Task-number: QTBUG-105213 Change-Id: I9a8922b5e9d215090dbdcc534c056c2cc068c009 Reviewed-by: Lorn Potter <lorn.potter@gmail.com> (cherry picked from commit e8e584090ba8d360e56bec988bba74baf90ee668) Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Only manually expose the wasm window on raise/lower if it is visibleMikolaj Boc2022-08-211-2/+4
| | | | | | | | | | | | | If the window is manually exposed and the window is invisible, the result is blocking the visual sync and repainting of the window, which makes the window 'dead' from user perspective until they click/activate it, which again sends an expose event to the window, restoring its updates. Fixes: QTBUG-105363 Change-Id: Iaa42f3ffeca179b8e6da19c9c02a6f01458ca66a Reviewed-by: Lorn Potter <lorn.potter@gmail.com> (cherry picked from commit 5a76837a7f4134454de65547043b78d51e3d7bef) Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QContiguousCache: fix streaming into QDebug when indices are > INT_MAXMarc Mutz2022-08-211-1/+1
| | | | | | | | | | As usual, int/qsizetype mismatch. Task-number: QTBUG-103525 Change-Id: Ic5d9fb4fd42e4534ec0358ca7c4d79650c6ac919 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit db4480062796482da766a58f4812faf63d8acab0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* [docs] QAnyStringView: mention automatic U8→L1 reclassificationMarc Mutz2022-08-211-0/+5
| | | | | | | | | | | | | ...for US-ASCII literals. Amends eaabd0c5450ad849e24878d38dd05d5b23d7eec3. Task-number: QTBUG-101014 Change-Id: Id0acccb9bf2dfb01bca93f62da634e8dfe299fbc Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit c51c4aa2c5593e0fbe2b309f0014a49ae6297606) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QDebug: finish porting put{String,ByteArray} to qsizetypeMarc Mutz2022-08-212-3/+4
| | | | | | | | | | | | | | | The underlying QTextStream seems to support qsizetype-sized data and the private API of QDebug that is under consideration in this patch takes size_t, but, as so often, there're int/uint casts in-between that break things. Widen the int/uint casts to qsizetype/size_t, respectively. Task-number: QTBUG-103525 Change-Id: I10bca093dc2d6f136871c94ca43f5b42fd1c8971 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit bc2b8411c9e510a1101ed09b627317854c6e7d45) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QDebug: port putEscapedString() from int to size_tMarc Mutz2022-08-211-4/+4
| | | | | | | | | | | | | | | | All callers of the function pass size_t values, so remove the impedance mismatch and preserve the value. Adjust local variable runLength to qsizetype, because with this change the int variable may now overflow, which would cause infinite looping. Adjust callers to not perform narrowing conversions. Task-number: QTBUG-103525 Change-Id: I2a9d3301118855fc95245a55bf64de6c46fa2f51 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit a888239cf15fb18034122a06c687526c83dbdaa9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Port QtDebugUtils::toPrintable() to qint64/qsizetypeMarc Mutz2022-08-212-4/+5
| | | | | | | | | | | Some callers pass qint64 arguments to the len parameter, so take the size as qint64, not qsizetype, to avoid silent truncation. Task-number: QTBUG-103525 Change-Id: I4bc5673297f24aea0cfc9d20887dc8a877743214 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit bcc32bc1128544cceb41d337ee16bc36c3eb188f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QDeviceDiscoveryUDev: use NSDMIMarc Mutz2022-08-212-4/+4
| | | | | | | | | This also fixes 0-used-as-nullptr warnings from clang-tidy. Change-Id: Ibf10f1719a6c8cf22046cf30298dadb307a853d5 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 401041f958c9a6a9535eb4590e8c4009cc491b5b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QAbstractFileEngine: port indexed to ranged loopMarc Mutz2022-08-211-7/+4
| | | | | | | | | | | | ... fixing a int/qsizetype mismatch in the process. As a drive-by, replace SESE with an early return. Task-number: QTBUG-103525 Change-Id: I961728ba818c4cb43c0e2c9056c70c8f37ad042e Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> (cherry picked from commit f40679dcdd8278aca5838101b2d4c3c7733ea130) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use the correct module exports in qtloaderMikolaj Boc2022-08-211-4/+4
| | | | | | | | | | | Refactoring of module exports in qwasmintegration.cpp was not followed by adjusting the qtloader. Do this now. Fixes: QTBUG-105264 Change-Id: Ibb0a4a20c0df1409cdcbba04ebd42c1569ae586a Reviewed-by: David Skoland <david.skoland@qt.io> (cherry picked from commit b7802b401fa40b3594b603102378f9a0c2b46421) Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Modernize QWasmCompositor::windowAtMikolaj Boc2022-08-211-15/+7
| | | | | | | | | | Use a well-known idiom for finding a matching window in the window stack (std::find_if) Change-Id: I677ef6ad8ee88bbd9eee1405be592ec2527ca3b9 Reviewed-by: Lorn Potter <lorn.potter@gmail.com> (cherry picked from commit 0881b5d75c8ad01b295edb96ffd1392d4b804e61) Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Don't access QObjectPrivate::declarativeData unguardedVolker Hilsheimer2022-08-212-3/+3
| | | | | | | | | | | | | | | | | | | | | | The QObjectPrivate::declarativeData member is stored in a union with currentChildBeingDeleted. The QObject destructor always sets the currentChildBeingDeleted member of the union. It also sets the isDeletingChildren bool, which is the only way to find out which union member we can safely access. While the QObject destructor is deleting children and isDeletingChildren is set, we must not access the declarativeData member of the union. Add a test case that initializes the function pointers for the declarative handlers and constructs a situation where an object emits a signal while it is destroying children. Fixes: QTBUG-105286 Change-Id: Iea5ba2f7843b6926a8d157be166e6044d98d6c02 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 3be99799a675a631c67e05897383af9abbc377b3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove QWasmCompositedWindow as dead codeMikolaj Boc2022-08-202-71/+19
| | | | | | | | | | | | | No fields in QWasmCompositedWindow, apart from visible, are used for any computation. They were write-only. Remove the class entirely and create a hash of visibility state instead. Fixes for z-order will follow. Change-Id: Icb7ff1865d1f9a67c0fde43cfa331ca1242ebcaa Reviewed-by: Lorn Potter <lorn.potter@gmail.com> (cherry picked from commit 4b165c6bcc0e2d29dda230854766a5359a7e8db9) Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Do not invalidate the entire window on window move on WASMMikolaj Boc2022-08-202-2/+9
| | | | | | | | | | | The invalidate on window move is redundant - the previous texture can be reused for the window. Just request another refresh on the compositor and don't update the window texture. Makes window moves smoother. Change-Id: Ied2922a000d3c8e6143e64d029154d74bc4f3480 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit 503018ae070d9d39ab85b66499e14a8085adf51e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Avoid image format conversion when drawing window nonclient areaMikolaj Boc2022-08-201-4/+11
| | | | | | | | | | | This radically speeds up window resizing and dragging. Fixes: QTBUG-105709 Change-Id: I844601a5b139d21024db0c373482af18f350d0eb Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 2a23652bbbba8def270b78d76c91a5a96d391106) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QSslServer: Re-enable read notifications when a client times outMårten Nordheim2022-08-201-0/+2
| | | | | | | | | | | | Otherwise new clients will not be handled when they try to connect Amends 29a1fe72a0888eb1f22a5ae9fe1b3d87257f3246 Change-Id: Ifff052d1bf27682df2782faa285a257c9b41d86f Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 50f8a9578dd54f74e8a5f99481f7f34d969d867f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix Multi-ABI builds when CMAKE_<C/CXX>_COMPILER_LAUNCHER contains listAlexey Edelev2022-08-201-2/+8
| | | | | | | | | | | | Add list-escaping for CMAKE_<C/CXX>_COMPILER_LAUNCHER variables when passing them to an external ABI-specific Android project. Amends c7231177df71879b6d3ebc48288a6d3d8fdab6d0 Change-Id: I0c98eee6594c395dc6a37465a99ea32b1af39b84 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit a2809d9ec1c4351bc356e05e8f3c1db0363bef86) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Move QT_SHARED, QT_STATIC and QT_CONFIG macos to qtconfigmacros.hSona Kurazyan2022-08-192-39/+38
| | | | | | | | Change-Id: Icf4621fa22f41355f98ed38b47560706258b41b7 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 43b59a842a86140fa5f5da2f0d66d0d916883c8f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Rename qtnamespacemacros.h -> qtconfigmacros.hSona Kurazyan2022-08-194-82/+92
| | | | | | | | | | | | But keep qtnamespacemacros.h for now, some modules include it explicitly, so need to change those to include qtconfigmacros.h first. The plan is to move QT_SHARED, QT_STATIC and QT_CONFIG macros there too. Change-Id: I945b3dfffbd9cd394a6cf42a36df6657d1703d5b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 22b16a1db143ff6764a55d3b58bd26b1f3c95a8a) Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Put code related to timezone functionality under QT_CONFIG(timezone)Tatiana Borisova2022-08-191-0/+2
| | | | | | | Change-Id: I0d1573dbb4ae4f9740fc19546950ae4316aa4c0c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 6a3509baa20ba049b84a7774a9b270bb81748148) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* a11y atspi: Send correct D-Bus reply for GetAttributeValueMichael Weghorn2022-08-192-12/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only return a string for the attribute value (an empty string if the attribute is not set). The previous implementation was based on the incorrect signature in the XML spec for the AT-SPI Text interface from before the AT-SPI commit that removed the extra out params [1]: commit 8786849ce6e9914383aa766ff9ce7e00f5b2178d Author: Patryk Kaczmarek <patryk.k@samsung.com> Date: Mon Sep 28 14:23:15 2015 +0200 Fixed atspi_text_ functions * atspi_text_get_text_attribute_value Fixed dbus signature in _atspi_dbus_call function and add missing argument for string. * atspi_text_get_default_attributes Receiving return value by reference from hash table https://bugzilla.gnome.org/show_bug.cgi?id=755731 [1] https://gitlab.gnome.org/GNOME/at-spi2-core/-/commit/8786849ce6e9914383aa766ff9ce7e00f5b2178d Fixes: QTBUG-105752 Change-Id: I66d3c484ecc4b469684635723242c915e4365e6a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit e6599bfa6134cfd3097c9cb8ec45801ae810f3df) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* a11y atspi: Add missing closing tag in introspection XMLMichael Weghorn2022-08-191-0/+1
| | | | | | | Change-Id: I4497353ef33a10b94141b24b9cda3fa7ee3e17b9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit c2289ca582a1b48fdb97146636fe29b680019260) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Deliver non-client area mouse events to WASM windowsMikolaj Boc2022-08-196-28/+80
| | | | | | | | | | | | QWasmCompositor now delivers non-client area mouse events to windows as it should, which fixes a lot of issues with window manipulation. One of such issues is re-docking of dock widgets. Fixes: QTBUG-105092 Change-Id: I9de45b7e1b1a80b64387031eb0cc0b31a4be2571 Reviewed-by: Lorn Potter <lorn.potter@gmail.com> (cherry picked from commit 19507dc6788f252cd0795d80d9a39d22f1306882) Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Remove unneeded QWindow from QGtk3DialogIlya Fedin2022-08-182-71/+20
| | | | | | | | | | | | | | It seems QWindow here is only for making the dialog modal, but QDialog already handles that and this makes two modals block each other depending on the order they created with Task-number: QTBUG-98988 Change-Id: I6847cfab480395f62eaa0ebf79acf8b024192178 Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> (cherry picked from commit 64e6233252117415d6765b6f7a8f4df39490b678) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QSslServer: Make sure maxPendingConnections applies to all socketsMårten Nordheim2022-08-184-1/+23
| | | | | | | | | | Not just the ones we added to the pending sockets list Change-Id: I0a0016fe39df7ca2fc3f0c4e4111195bc6d90198 Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 1ee75e47401d0ed4646d4fef7ce8e09eb90f4d5e)
* QSslServer: Implement handshake timeoutsMårten Nordheim2022-08-183-3/+67
| | | | | | | | | | | | | | | | If a client doesn't send any data then we would leave the socket open for as long as it needed, wasting resources. Add timeouts to limit the amount of time this can happen for. Since there is a limit on number of sockets that the server will have queued, having idle sockets stick around forever is a vector for ddos. Change-Id: Ida6251c92c625eeadf2065861b840b14255654b8 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 29a1fe72a0888eb1f22a5ae9fe1b3d87257f3246) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>