summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* QAbstractItemDelegate: tolerate that editor gets reparentedv6.4.0-beta4Volker Hilsheimer2022-08-252-2/+73
| | | | | | | | | | | | | | | | | | | | 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>
* Wayland: Skip test that queries window positionEskil Abrahamsen Blomfeldt2022-08-251-2/+3
| | | | | | | | | | | The client does not know its global window position on Wayland, so testing for this will not work. Fixes: QTBUG-100888 Change-Id: Ibdfc84f1b33d25223dbd740603ce4783c21afc70 Reviewed-by: Inho Lee <inho.lee@qt.io> (cherry picked from commit e8031906b596fb58d4426fc1ea2c93d3fcb0d77d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qmake: Reformat mkspecs/macx-ios-clang/Info.plist.appAlexandru Croitor2022-08-251-33/+46
| | | | | | | | | | | Replace tabs with spaces. Add some newlines. Task-number: QTBUG-95838 Change-Id: I0fa0e7b74590e7a093d22de85e24d4456ece4a63 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 4a13083bad111fb9f0a8a1628221038b786a5b63) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Default CFBundleDevelopmentRegion to $(DEVELOPMENT_LANGUAGE)Alexandru Croitor2022-08-251-1/+1
| | | | | | | | | | That's what new projects in Xcode set. Task-number: QTBUG-95838 Change-Id: Id07dca0f56c8849a93085c5d36910679e45381b4 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit f16c7e15a2272673e99aee029808deccfe5d32f8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Replace tabs with spaces in iOS Info.plist templateAlexandru Croitor2022-08-251-35/+35
| | | | | | | | Change-Id: Ied8f31a22c14688fd250955bb54f161f07bea90b Task-number: QTBUG-95838 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit c0bb65ec022ba209aa0cf8d2615ba08922b3dccf) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qshortcut: port away from deprecated APIsIvan Solovev2022-08-251-37/+37
| | | | | | | | | | | Explicitly call QKeycombination::toCombined() instead of deprecated implicit operator int(). Task-number: QTBUG-104858 Change-Id: I46b0863eda445e832a9490bc2a3d05811c2df8c6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit e5c184ecd11ab1f03ee568687fbfd25d1c2dd8d2) 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>
* wasm: add echo_server test TCP serverMorten Sørvig2022-08-242-0/+141
| | | | | | | | | Test server for in-browser TCP usage. Change-Id: Ia1a29c0e14a6d2ee8075ce202c9f6998a3ccc4c9 Reviewed-by: Lorn Potter <lorn.potter@gmail.com> (cherry picked from commit a2d0ce32cdfffd3fff1be9c0d6663e11bb01419d) 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>
* Create a driver for running batched tests on WASMMikolaj Boc2022-08-245-0/+478
| | | | | | | | | | | | | A driver application has been prepared in js for running batched tests. There is a convenient public API defined for reading the current test status & subscribing to changes thereof. The solution is modular - the module qwasmjsruntime can be used for any wasm instantiation, e.g. in the next iteration of qtloader. Change-Id: I00df88188c46a42f86d431285ca96d60d89b3f05 Reviewed-by: David Skoland <david.skoland@qt.io> (cherry picked from commit ad1980cd4326acca891ed0fa4326ed1b22828324) 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-242-14/+70
| | | | | | | | | | | | | | | | | | | | 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>
* qmake: Fix installation of separate debug info for pluginsJoerg Bornemann2022-08-241-1/+1
| | | | | | | | | | | | | | | This amends commit fc2e40e88d44d457ec5ebd1cc235696f3f478be9. For Qt plugins, we do not add 'dlltarget' to INSTALLS but only 'target'. In this case we must add the .dll.debug file to 'target' like we did before fc2e40e88d4. Fixes: QTBUG-105374 Change-Id: If495548dfca55d02e1c5884e03e281e27ee07ccd Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io> (cherry picked from commit 38ca34ac935e222d532fc5f6939efaa15c633b39) 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>
* tst_qgraphicswidget: Avoid redeclaration of Size from MacTypes.hTor Arne Vestbø2022-08-221-29/+29
| | | | | | | | | | If an included header brings in MacTypes.h it will cause issues, so rename the enum to be on the safe side. Change-Id: I29ec795be74a65d4f2267d8121a514bf192cf969 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 1ecfc4101cf41b1d3947ed938bb76c52919f360b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* 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>
* tst_qbytearray: remove qCompress_data for QT_NO_COMPRESSMarc Mutz2022-08-211-2/+2
| | | | | | | | | | The _data function is useless without its test function (and it's not used in other _data functions). Change-Id: I7aa6006ed1a9d89008577b750af4ea717dae237f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit b5d5385201e74c216c69aff78c383738e801a839) 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-213-3/+80
| | | | | | | | | | | | | | | | | | | | | | 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-202-6/+18
| | | | | | | | | | | | 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>