summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Clarify the priority in selecting TLS backends6.6Timur Pocheptsov2024-04-201-1/+6
| | | | | | | | | | | | | | In case a custom TLS plugin is provided, the order can be unclear (next after OpenSSL is either Schannel on Windows, or Secure Transport on Darwin, then a custom plugin, if any, and the last one is 'cert-only'). Pick-to: 6.5 6.2 Fixes: QTBUG-123092 Change-Id: I02bcc1fa5448f64846d561a72b2522af3286c66c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 128645d02338029858dd3e03defeff9f16d80172) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 8e0bb88d96374de4992944f05dc5ff8e5e82af6f)
* QDebug: fix copy-instead-of-move issuesMarc Mutz2024-04-201-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Coverity correctly complains that we're copying the QDebug object when calling print*Container() when we could have moved it into the helper. So do move it. Pick-to: 6.5 Coverity-Id: 406803 Coverity-Id: 407406 Coverity-Id: 408523 Coverity-Id: 408562 Coverity-Id: 418431 Coverity-Id: 424788 Coverity-Id: 425106 Coverity-Id: 426537 Coverity-Id: 427163 Coverity-Id: 428925 Coverity-Id: 444463 Change-Id: Ic80247f315a09fffe9363577dff1d1c781859304 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit 7e8196510df88bc956492593c27da1af7b31b8ef) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit aecc4b1aba48636568043b985eeb72023b8a9e0e)
* Doc: Remove table for listing imagesVenugopal Shivashankar2024-04-181-15/+12
| | | | | | | | | | Task-number: QTBUG-122580 Change-Id: I7ca3d677262b48ce9e1d85bd9347ad5b15d1598f Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit f3b73645a80086b1fb81b3d5554e9edb3500fce7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit c21dc81e15a5f67844c6e09b08eb30baf72907b1) Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* syncqt: remove dead codeMarc Mutz2024-04-121-1/+0
| | | | | | | | | | | | | | | | | | | | | | | Either the code in the try {} block - doesn't throw, then the return within the try {} block exits the function, or it - throws fileystem_error, then we rethrow in the catch, or it - throws any other exception, then we leave the function by exception In no case can control reach the trailing 'return {}'. Found by Coverity. Amends 7aecb189d544613ad13c7e7d1207bd7767225a71. Pick-to: 6.5 Coverity-Id: 444466 Change-Id: I1c1bf752453076724c2fa9367ea5309e741d84ac Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 73d00d05477fb6da25164b37135bb19a300bea8d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 406c0d3464df1f0427ad2605ed34d9d0b0c022de)
* QLocal8Bit::convertFromUnicode[win]: limit fprintf to !NDEBUGMårten Nordheim2024-04-091-0/+2
| | | | | | | | | | | | Because there is no other way to stop it from printing the output. Pick-to: 6.5 Change-Id: Ie6dcb393351f50691366849ba85d60e2e186f9fb Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 1dd89bfb04515bd2e431f8915256a417d622288f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit d059d5c3cb9dddcc55cf5291cd1b7222169d105b)
* widgets: Invalidate RHI swapchain when window moves to new top levelTor Arne Vestbø2024-04-052-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a QWidget with an associated RHI swapchain (via its QWindow) is moved to a different top level window, that top level window has its own backing store, and QBackingStoreRhiSupport, which doesn't know anything about the fact that the window already has an associated swap chain in the original top level window's QBackingStoreRhiSupport. As having multiple swap chains for the same window is not supported on all RHI backends (Vulkan and DX in particular), we need to throw away the swap chain when detecting that the window is moved to a new top level. We do this by hooking into the existing WindowAboutToChangeInternal event delivery to renderToTexture children, which now delivers the event both to renderToTexture QWidget children as well as QWindows in the hierarchy. The condition of when to deliver the event has been updated to reflect whether the top level uses RHI for flushing, instead of only including renderToTexture children, as the former also includes setting QT_WIDGETS_RHI=1 explicitly. The event is then caught by QBackingStoreRhiSupportWindowWatcher, and handled the same way as for SurfaceAboutToBeDestroyed. Renaming qSendWindowChangeToTextureChildrenRecursively would make sense at this point, but to make cherry-picks easier we keep the current name for now. Fixes: QTBUG-120276 Pick-to: 6.5 Change-Id: Ic4c60e89be985f12a84e9f893c299e602b70851a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 1bd755465efa27294362925f55306f88f1800936) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 81581819c79c9195b0a732cc3ba99a67a18c06f0)
* doc: Remove deprecation of the supported QTouchEvent ctorShawn Rutledge2024-04-051-2/+0
| | | | | | | | | | | Amends 111115bf8862b7cd1197c2ef8a4b475c882776d4 Change-Id: Ibc557fdde9c894a3a58bb58835e11be9180e6e6d Pick-to: 6.5 6.2 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit 14610fb1749a22abbd203f42e3edb3f4425cb215) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit ab597b84b3a6a3d3d52d06582b412b31a8f4f143)
* Decouple rate-limiting of paint-on-screen widgets from top level widgetTor Arne Vestbø2024-04-041-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of eacd58d4e78e7238ba5fcca90ba960aaf3ebd263, a mechanism was added to prevent posting redundant UpdateRequest events to the top level widget, managed by QWidgetRepaintManager. The mechanism relied on a boolean that was set when posting an update request event, and reset when processing the event for the top level widget, as part of QWidgetRepaintManager::sync(). However, for paint-on-screen widgets, we don't post an update request to the top level, we post it to the paint-on-screen widget directly. And when processing that event, we don't paint the widget though the normal QWidgetRepaintManager machinery, but instead call the paint event via QWidgetPrivate::paintOnScreen(). As a result, an update() on a paint-on-screen widget would result in never receiving updates for non-paint-on-screen widgets, as we assumed there was no reason to send further update requests. We could fix this by clearing the updateRequestSent flag as part of the paintOnScreen() code path, but that's incorrect as the flag represents whether the top level QWidgetRepaintManager needs an update request event or not, and would lead to missed updates to normal widgets until the paint-on-screen widget finishes its update. Instead, we only set updateRequestSent if we're posting update requests for non-paint-on-screen widgets, which in practice means the top level widget. The paint on screen logic in QWidgetRepaintManager::markDirty still takes care of rate-limiting the update requests to the paint-on-screen widget, by comparing the dirty area of the widget. There is definite room for improvement here, especially in the direction of handling update requests via QWindow::requestUpdate instead of manually posted events, but for now this will have to do. Fixes: QTBUG-80167 Pick-to: 6.5 6.2 5.15 Change-Id: Ib5685de7ca2fd7cd7883a25bb7bc0255ea242d30 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 697e1b0397259959e3f555296f87a0d9d923e4b5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit c198f7124cfb043ee1f04b13fc857bf3d5081bcd)
* macOS: Remove popup mouse and app activation monitors on app shutdownTor Arne Vestbø2024-04-031-0/+3
| | | | | | | | | | | | | | | We're not guaranteed to get into any of the code paths that call removePopupMonitor() before the app goes away. In a plugin-scenario, this may cause crashes when our monitor then gets a callback and we try to access QGuiApplicationPrivate::instance(). Pick-to: 6.5 6.2 Fixes: QTBUG-123959 Change-Id: I287b91ff261a8aab74adbbad8c63a042daf944d5 Reviewed-by: Doris Verria <doris.verria@qt.io> (cherry picked from commit 8bb93bf8ee59b3e31e7353d6683dbb0aa890f7e7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit fa92448dd60b8b0fded3abdc933308dd03432c6c)
* Fix data() with long datatype for Mimer SQLFredrik Ålund2024-04-031-1/+1
| | | | | | | | | | | | | Calling data() for parameters of the type bigint failed in combination with stored procedures with output parameters. Cast the result to qlonglong to fix it. Change-Id: I84ef04ed26821b92ef7c5bcdf12b778e91450e0b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit ad84754b5888971074a44ec698d20a32aebeec14) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 149d5ae3edab4695bad59e0f7cd9720d3cf27965)
* QRhiVulkan: fix random values in pipelineCacheData() resultMarc Mutz2024-04-011-0/+1
| | | | | | | | | | | | | | | | | | | | | The QVkPipelineCacheDataHeader::reserved field wasn't initializaed by the code, but then memcpy()ed with the struct into the result QByteArray. At best, this contains random data, at worst, it leaks information. Initialize it to zero. Found by Coverity. Amends df0e98d4080f50de7ecacdc4cae079ab31280481. Pick-to: 6.5 6.2 Coverity-Id: 444147 Change-Id: I398c9a1e99483f2f9887d768319b20ecc11e2c86 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit 2913e7de5186fc4fd3576167304c214d30f78d2e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit bed03c10be8a93debfa0ee00c544efb2d966b742)
* Documentation: Clarify palette/font/stylesheet inheritance/propagationAxel Spoerl2024-03-292-7/+16
| | | | | | | | | | | | | | | | | | | Palette and font changes made by a style sheet are propagated to existing widgets and their children at change time. Palette and font changes made by setPalette() and setFont() are inherited by all existing and future children of the widget to which the call was made. Clarify this in the documentation. Fixes: QTBUG-122588 Pick-to: 6.5 6.2 5.15 Change-Id: Ic40d96fc1e5e4507f84a33138303b7193948d3fe Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit f2b681dc590c7fd3cd19cbde20363339ceae15f8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 359b648280270ab80d032cb6efc76516efcd2023)
* Add the note about data size to QByteArray::operator=(const char*)Alexey Edelev2024-03-281-0/+3
| | | | | | | | | | | | | Add the note about the way the str size is determined when using QByteArray::operator=(const char*). Pick-to: 6.5 Change-Id: I39b2d0fc2967832622fbf0c11b3ff6c7ff99b8f2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> (cherry picked from commit 32e2386b157effa5f253ffd669ed52471863823b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 41ecbdf4670171f1d9f68fb6ccd74ef4b05368cd)
* QMenu: clear popup screen after exec()Axel Spoerl2024-03-281-0/+1
| | | | | | | | | | | | | | | | | | | 8cd7a3d4723ca414f3fe544704a0ccb752da94b8 remembered the current screen in QMenuPrivate::popupScreen. This QPointer member is not reset, after QMenu:exec(), which makes a re-used menu remember the wrong screen, if its next usage happens on another screen. Reset the member variable at the end of QMenuPrivate::exec(). This amends 8cd7a3d4723ca414f3fe544704a0ccb752da94b8. Fixes: QTBUG-118434 Pick-to: 6.5 Change-Id: I7457ca72166346f01cf71b2706ebc20ecd71173c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 7aedcdefb81004f57e664409c0fb9f9b371ff4f0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 137706fc31b0018b69b59827176cfd06e983c39b)
* qfloat16: further disable the -Wfloat-conversion warningThiago Macieira2024-03-281-1/+3
| | | | | | | | | | | | It shows up in our headersclean mode. Fixes: QTBUG-123374 Change-Id: I6818d78a57394e37857bfffd17bcf9e350dc493c Reviewed-by: Simo Fält <simo.falt@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 58796ac177cde3f558aec92c00e7ee8e174ba228) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit fa601afd5210106aa17f27ab29359f6a10610ba1)
* QPolygonF: delegate QDataStream marshalling to QListThiago Macieira2024-03-271-18/+2
| | | | | | | | | | | | | | | | | Like the QPolygon code. This fixes a mistake in failing to clear the list before de-marshalling in operator>>. Updated most of the QDataStream tests to have data in the objects they're streaming into, to ensure that the stream overwrites everything. Fixes: QTBUG-122684 Task-number: QTBUG-122704 Pick-to: 6.5 5.15 Change-Id: I01ec3c774d9943adb903fffd17b6920c72f5042b Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit 1ebee8980ba31514079a01989168914bfd1e9f4f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 113ecff9f229dffa37bf099aa22718272dfae52d)
* QMainWindowLayout: rewrite validateToolBarArea() to return by valueMarc Mutz2024-03-271-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coverity complains that QToolBarAreaLayout's addToolBarBreak(QInternal::DockPosition) could access QToolBarAreaLayout::docks out of bounds if passed QInternal::DockCount. That is correct, but a valid pos seems to be a precondition for this function, judging from its sister functions, e.g. addToolBar(DockPosition, .) or insertItem(DockPosition, .), which also don't validate `pos`. All in-module callers of addToolBarBreak() only pass valid positions, and use validateToolBarArea() to ensure that. So it seems that Coverity doesn't grok the pass-by-in/out -parameter used by that function. That, or it doesn't track back far enough. Before attempting more drastic measures, first try rewriting the function to return-by-value instead, and see what Coverity has to say afterwards. As a drive-by, make validateToolBarArea() constexpr. Pick-to: 6.5 6.2 5.15 Coverity-Id: 444141 Coverity-Id: 444135 Change-Id: I5fcc664c3cea608429036cad75c37f5c38059733 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 19aeb431cf1bd4e864356ff02db6337dc59b2835) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 59072e9916278db1fc104656ba9fbf3e65317367)
* xcb: try to repopulate xinput2 devices when neededLiang Qi2024-03-241-1/+10
| | | | | | | | | | | | | And try to not call Q_ASSERT() to avoid crash. Fixes: QTBUG-123554 Pick-to: 6.5 Change-Id: I9443c5f0ab4ca7a858df9b328f517b48ab8f122d Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit 2862cdb7ba22cc99d1db158888ba0bb32c47e8e8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit ed96f3bd2f76c7c6b86ffeaaf0083cdec53fff18)
* QFutureWatcher: Fix race for initial emission of resultReadyAt()Jarek Kobus2024-03-221-16/+10
| | | | | | | | | | | | | | | | | | | | | | | | When connecting a QFutureWatcher to the QFuture it will connect to the output interface, which will queue up events to notify about the current state. This happens in the thread of the QFutureWatcher. Since 07d6d31a4c0c17d8c897d783a9b0841df6834b02 unfortunately the sending of those events was done outside the lock, meaning the worker-thread could _also_ send events at the same time, leading to a race on which events would be sent first. To fix this we move the emission of the events back into the lock and because it is now inside the lock again anyway, we will revert back to posting the callout events immediately, so this patch also partially reverts 07d6d31a4c0c17d8c897d783a9b0841df6834b02 Fixes: QTBUG-119169 Change-Id: If29ab6712a82e7948c0ea4866340b6fac5aba5ef Reviewed-by: Arno Rehn <a.rehn@menlosystems.com> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> (cherry picked from commit 63b2cf8a457f0eea861fa060c610a74b35450ba6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 933b606af57133d890e64abb708c2c3cf751b915)
* Add the error output for syncqt normilizedPath functionAlexey Edelev2024-03-221-5/+12
| | | | | | | | | | Task-number: QTBUG-123438 Pick-to: 6.5 Change-Id: If718d774daac2fd4a9e27ad4725a74362d1c78f3 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 7aecb189d544613ad13c7e7d1207bd7767225a71) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 1e3c0e43953c89e16eb6275f9bac799d9cbf5ddf)
* Use the correctly versioned variable when resolving ABI-specific cmake directoryAlexey Edelev2024-03-221-1/+2
| | | | | | | | | | | | | Use the QT_CMAKE_EXPORT_NAMESPACE prefixed INSTALL_LIBS variable when resolving the cmake path of the ABI-specific cmake directory. Pick-to: 6.5 Change-Id: Ibc4a1b152135d840de104c15a183b13fca0739ea Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit df8c3d40c85465027de375f656684badc6247121) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 539c6b6f76cd89d57506a6a540f593ed558eccc8)
* Don't accept QFileDialog when disabled item is activatedKeith Kyzivat2024-03-221-2/+3
| | | | | | | | | | | | | | | | On macOS, entries that do not match the filter are shown in the directory listing. Do not accept the dialog when these entries are double-clicked (activated). Pick-to: 6.5 Fixes: QTBUG-120768 Change-Id: If8ff6c56f1d21861b4e30051c212c9497042ed0f Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> (cherry picked from commit 0f77aff05fa6eb059d7f8517c94c88f889b44e6e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 41e943aeda8218100295987d32d8bfb860b4a2a5)
* gui: fix build against gcc-14 (-Werror=calloc-transposed-args)Liang Qi2024-03-221-1/+1
| | | | | | | | | | | | | | | | src/gui/painting/qpaintengine_raster.cpp:3811:42: error: ‘void* calloc(size_t, size_t)’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] 3811 | m_clipLines = (ClipLine *)calloc(sizeof(ClipLine), clipSpanHeight); | ^~~~~~~~~~~~~~~~ src/gui/painting/qpaintengine_raster.cpp:3811:42: note: earlier argument should specify number of elements, later size of each element Pick-to: 6.5 6.2 5.15 Change-Id: I41ec3dd5c439e5cd51dd917741125ce50659500e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit 12a432c80feba60ced4c67b496ac0762bacb8777) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit d96653f559175f42da36ad5f590a113121368e65)
* UDP: Protect call to UDP API based on featureMårten Nordheim2024-03-221-1/+5
| | | | | | | | | | | | Fails to compile in some qtlite setup Pick-to: 6.5 Change-Id: If04c1ca3f1b4eb59517902b8caab167f4627391b Reviewed-by: Jari Helaakoski <jari.helaakoski@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 505e7ec37d98da2010981ed17c39dd934edf47d1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 39e8c72c672fae8b1bc35eca3d03d6b133c92e04)
* QMetaMethod: document that fromSignal(nullptr) is okMarc Mutz2024-03-221-1/+1
| | | | | | | | | | | | ... and add a test. Pick-to: 6.5 6.2 5.15 Change-Id: I907899d7c54349d2fc23ea5ab58a1e67826b622b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 78db468f4895911e50849223899abf2c5fb1c72e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 9f14d0a288ef5355ca92e64fe464735f119b8ec5)
* QSignalSpy: fix indexed loop (int instead of qsizetype)Marc Mutz2024-03-211-1/+1
| | | | | | | | | | | | | While a signal with more than 2Gi arguments is only a theoretical possibility, still use the correct index variable for the indexed loop over this QList<int>. Pick-to: 6.5 Change-Id: I2ed33238c2cd9d2d1c39cd29c988a2adfd821897 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit a90c3cc3c7ed24c83b9ffa4020cb3652678b36bf) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 2ec659b1758c76502b1914baaeeb01beeaade4e4)
* QObjectPrivate::Signal: initialize all membersMarc Mutz2024-03-211-1/+1
| | | | | | | | | | | | | | | | | | | A recent change in that area triggered Clang-SA to rescan the code and complain about this pre-existing bug: If receiver == nullptr, then the `previous` member was never initialized. Fix by null'ing it using NSDMI. This is a trivial type, the compiler will be able to avoid the redundant write. Amends ab92b9e40025dcf08c14232de762a268201a78b4(!). Pick-to: 6.5 6.2 5.15 Change-Id: Ideed71f0f36d5f896fb6a4614f233757c1371ee3 Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 40714c1ddd886f6d0bde53e05f27d6b3e9e6649b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit beabcc543640bdde4e88eeff5cd614d021c00f51)
* Doc: Fix QDoc syntax in bindable properties overviewPaul Wicking2024-03-211-2/+2
| | | | | | | | | | | Drop the \c command when in front of \l commands as that doesn't work. Change-Id: I0aa092461807e068e9c2368f5d6f04e77b56c910 Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io> Reviewed-by: James DeLisle <james.delisle@qt.io> (cherry picked from commit c8fb376de50683c81cbf64b4422058d4dd2e9f07) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 611366f1baa7db20d38e21889eed6518a13fa9e9)
* QObjectPrivate: fix data race on ConnectionData contentsDavid Faure2024-03-202-22/+29
| | | | | | | | | | | | | | | | The atomic pointer "connections" is always populated under mutex in QObjectPrivate::ensureConnectionData() but isn't necessarily read under mutex protection (e.g. in maybeSignalConnected()). This caused a data race, fixed by using storeRelease and loadAcquired. Task-number: QTBUG-100336 Pick-to: 6.5 Change-Id: Ifd605e65122248eb08f49e036fdda6e6564226bc Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 75d82afa0d3aad9b4f9857e439535fc49c4616bc) (cherry picked from commit 67487f004c48ee045cc0be476249b2786d606a67) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Reparent QWindow children when reparenting QWidgetTor Arne Vestbø2024-03-202-39/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a QWidget was reparented, we would take care to reparent its backing QWidgetWindow as well, into the nearest QWindow of the new QWidget parent. However we would only do this for the reparented widget itself, and not any of its child widgets. In the case where the widget has native children with their own QWindows, the widget itself may not (yet) be native, e.g. if it hasn't been shown yet, or if the user has set Qt::WA_DontCreateNativeAncestors. In these scenarios, we would be left with dangling QWindows, still hanging off their original QWindow parents, which would eventually lead to crashes. We now reparent both the QWindow of the reparented widget (as long as it's not about to be destroyed), and any QQWindow children we can reach. For each child hierarchy we can stop once we reach a QWindow, as the QWindow children of that window will follow along once we reparent the QWindow. QWindowContainer widgets don't usually have their own windowHandle(), but still manage a QWindow inside their parent widget hierarchy. These will not be reparented during QWidgetPrivate::setParent_sys(), but instead do their own reparenting later in QWidget::setParent via QWindowContainer::parentWasChanged(). The only exception to this is when the top level is about to be destroyed, in which case we let the window container know during QWidgetPrivate::setParent_sys(). Finally, although there should not be any leftover QWindows in the reparented widget once we have done the QWidgetWindow and QWindowContainer reparenting, we still do a pass over any remaining QWindows and reparent those too, since the original code included this as a possibility. We could make further improvements in this areas, such as moving the QWindowContainer::parentWasChanged() call, but the goal was to keep this change as minimal as possible so we can back-port it. Fixes: QTBUG-122747 Pick-to: 6.5 Change-Id: I4d1217fce4c3c48cf5f7bfbe9d561ab408ceebb2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit c956eb8eddb1b3608d7e3d332fbe55df5ec41578) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 8ee25c66d934850eba4167246cdab2310704c45d)
* xcb: Avoid recreating xcb window in QXcbWindow::requestActivateWindow()Liang Qi2024-03-201-1/+6
| | | | | | | | | | | | | | | 12203e94f5a34b59b6a7389402c854e823135a35 exposes the issue in xcb qpa plugin. We should not recreate xcb window via the call of focusWindow->winId(). Fixes: QTBUG-123032 Pick-to: 6.5 6.2 5.15 Change-Id: I6da4f3e64a9d7a92a2aab714591986c5d128fbd4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 23a906335e0d8a03388bbd73db43682c724d04a7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 167287e11a1b608f298d3aed5c593ac41897d8a9)
* iOS: Use UIWindow bounds for fullscreen/maximized geometry on macOSTor Arne Vestbø2024-03-201-15/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In modern iPad apps, windows can be moved between screens, just like regular macOS apps, but we don't reflect this as changes to the QWindow's screen, meaning the screen() is not reliable input when computing a window's full screen or maximized geometry. In addition, when running iOS apps on macOS as "Designed for iPad", the system will scale the UI down by 77%, to better match metrics (fonts, sizes) to the macOS environment. Classes like UIView and UIWindow are oblivious to this scaling, and will think they are larger than what they really are on the screen. However, UIScreen, for some reason, reflects the actual screen size, instead of taking part in the "inflated" view of the world. As a result, even if screen() would reflect the correct screen the window is on, we can't use the screen geometry for clamping the window geometry, as the two have separate coordinate systems. We could scale up the QScreen geometry accordingly to work around this, but we don't know if the UIScreen behavior is a bug or not, so instead we skip the screen() as input and use the UIWindow bounds directly. Task-number: QTBUG-121781 Fixes: QTBUG-106709 Pick-to: 6.5 Change-Id: Ie734fc477b37a7e39e6fb16d7738d3f69731a975 Reviewed-by: Amr Elsayed <amr.elsayed@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 2da738f03589b2bb53e921b5fec347bdd6b68b16) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 5195c6683d6d1c262227f67c9954e80c21f54156)
* Suppress bogus warning from gcc 12Ulf Hermann2024-03-201-2/+1
| | | | | | | | | | | | | | | | | | | | | It says: /home/qt/qt6dev-src/qtbase/src/corelib/tools/qcontainertools_impl.h: In function ‘auto QtPrivate::sequential_erase_with_copy(Container&, const T&) [with Container = QList<void (*)()>; T = void (*)()]’: /home/qt/qt6dev-src/qtbase/src/corelib/tools/qcontainertools_impl.h:383:14: error: ‘D.282000’ is used uninitialized [-Werror=uninitialized] 383 | const T &tCopy = CopyProxy(t); | ^~~~~ cc1plus: all warnings being treated as errors We can avoid storing the value into a const ref to silence this. Storing a non-const pointer into a const reference is quite confusing anyway. Fixes: QTBUG-123486 Pick-to: 6.5 Change-Id: I77fcd871724ce7f81b9567603dc5b4cb31f121c5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 4662e80755b3002585280cfe9076d2c6c14f1e5b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 24cc41f77fefa20d4bf4acb6dd1a96b2371ebfd2)
* QSignalSpy: fix C'n'P mistake in a qWarning()Marc Mutz2024-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | The warning for the new-style signal constructor was copied from the old-style signal constructor, but not adjusted to its new home. The signal pointer passed here is not the signal "name", but a signal "pointer" (-to-member-function, but no need to go into that much detail). Amends 6fc7d76e7309c01a364b0f72d253735366674f29, but not picking to very strict LTS branches, just in case someone has a QTest::ignoreMsg() installed on it. Pick-to: 6.5 Change-Id: Ia1f6b7001f38202ac72f9945c4a822d81562cdbf Reviewed-by: David Faure <david.faure@kdab.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 7565034aadf955537be908a94e4cef16096a041f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 24c2b8f8ab68c21953e28051bf402171ccb204be)
* Fix dangling references - GCC 14Liang Qi2024-03-191-1/+1
| | | | | | | | | | | This amends 18def77d27f88ce26b6af29fe56a80429fed555d . Pick-to: 6.5 Change-Id: Icadf46326f1fda1bdbcd40d101170581e510b87a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 8a6750475410629741de0417c28f574c25c65338) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 2a6015914c92edab473995aaf61d67f06478d185)
* QDBusArgument: disambiguate between QMap on std::pair and std::mapThiago Macieira2024-03-191-1/+5
| | | | | | | | | | | | | | | | For QMap on a std::pair, QMap::iterator{}.operator->() would result in a type that has "first" and "second" members: std::pair itself. But it would be wrong to marshall and demarshall the first and second elements thereof as the key and value, so give preference to the .key() and .value() selection, which would store the std::pair as the type. Fixes: QTBUG-123401 Pick-to: 6.5 Change-Id: I6818d78a57394e37857bfffd17bd69bb692dd03b Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 5401a9a6cd3263eda15911c3fbfc81ebea2e798f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 9ffed81b159e9bdf4aba26dfdbd08ff508ffe8b3)
* qxkbcommon: fix isKeypadYifan Zhu2024-03-191-1/+40
| | | | | | | | | | | | | | | This amends a34e81ab8be6445877e040b1afb85deeaa725f86 . The previous range comparison doesn't work since XKB_KEY_KP_9 is 0xffb9 while XKB_KEY_KP_Equal is 0xffbd. Change to an explicit switch. Pick-to: 6.5 6.2 5.15 Change-Id: I3a340bac61fb074eef505ef9b06300a6468877f1 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Liang Qi <liang.qi@qt.io> (cherry picked from commit daa5f7bd5f3951e459f10666a8001c8a0076e827) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 56247e4a327308b0314ef19cb29396d0bd0d71e0)
* dwrite: Fix crash when loading unsupported font in QRawFontEskil Abrahamsen Blomfeldt2024-03-191-0/+3
| | | | | | | | | | | | | When we tried loading an unsupported font, there was an unchecked nullptr which caused crashes later. This is a hotfix for 6.6 and older versions, as in Qt 6.7 it is already part of 500be123f4fbb60593fe25d5fe70fbc62445e8aa. Pick-to: 6.5 6.2 5.15 Fixes: QTBUG-123454 Change-Id: I954a39b5e26714b1cc197d2870e9caef87b0423e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Doc: explain how to check for the existence of a font familyMitch Curtis2024-03-191-1/+32
| | | | | | | | | | | | | | | | bb6d68703b67e042e2a7254c2ca6a004a1441cc5 fixed warnings in the Universal style by using a faster alternative. It's possible that users will run into these warnings too, and they should be provided with information to make a more informed choice about which approach they can use. Fixes: QTBUG-123360 Pick-to: 6.5 Change-Id: I4170e9ade40c4b54dbc2bd73d124b2ade4d8c939 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit ce9f06c1579efda7ae0d259bfaa565f99d89e4f7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 78b7b0472cb086f4be157ffee8d6c26bff8502ca)
* QSignalSpy: fix data race between wait() and emit from another threadDavid Faure2024-03-191-6/+21
| | | | | | | | | | | | | | Detected by TSAN in tst_QThread::terminateAndPrematureDestruction() but better have a dedicated unittest, with values emitted by the signal and recorded in the spy. Pick-to: 6.5 Change-Id: I141d47b0ea0b63188f8a4f9d056f72df3457bda5 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit c837cd75936cbeeb898dd5808edb9dfaf716a76e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 3b428d6f28a3664220d4c7eef8f8ee1779d206e2)
* iOS: Remove NSView.safeAreaInsets wrapperTor Arne Vestbø2024-03-194-8/+2
| | | | | | | | | | | | The API is available on all iOS versions we support nowadays. Pick-to: 6.5 Change-Id: Ia58c5ad1649e7e6b22f9c56a809e2455586a8e5a Reviewed-by: Amr Elsayed <amr.elsayed@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io> (cherry picked from commit a89a916377f774ea55b43afc56cb89070097883f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit eefb27bb3f367b50f9edf833fd98c112ba41c19d)
* QProperty: Destroy binding when refcount is 0Ulf Hermann2024-03-192-9/+16
| | | | | | | | | | | | | This has to be done from all places where we deref it. Otherwise we leak memory. Pick-to: 6.5 Fixes: QTBUG-116086 Change-Id: I57307ac746205578a920d2bb1e159b66ebd9b2cc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 717dc9450ffc13ef8209a10073552ac4574a4160) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 933d695ecb5d8e2dbe107e5fd15428a7484ede8f)
* Fix default hinting with dpr scaling on WaylandEskil Abrahamsen Blomfeldt2024-03-193-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When high-dpi scaling is enabled, we default to HintNone currently, since otherwise text layouts (and widget layouts and anything depending on text size) will have to be updated when the window is dragged onto a screen with a different dpr. The check for whether scaling is enabled was based on QHighDpiScaling::isActive(), which is technically incorrect since this does not return whether there is a scale on the painting, rather whether the coordinate system in Qt matches the one of the platform. Now that we support agreeing on fractional scale factors with the Wayland compositor, this issue has become visible, since QHighDpiScaling::isActive() will now return false for these compositors, even for fractional scales. For integer scales, the issue existed before as well, but the kerning issues are less noticeable in that case. Fixes: QTBUG-122910 Change-Id: Ic82b07d57a06a351255619f9227dd60396903ade Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de> (cherry picked from commit e7ddd490cf44ecd1c59b3798294ed2812fc5a940) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit cdee812bdbe1d39941ff6303048c7191385ad39d)
* QDialogButtonBox: Don't set focus in a dialog with StrongFocus childrenAxel Spoerl2024-03-163-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A QDialogButtonBox with the first accept button becoming default, didn't explicitly set focus on such a button in a QDialog. d44413d526ec12ed83acd7343c2005782178c7ad implemented this missing functionality. It set focus to the automatic default button, unless the QDialog had a focusWidget() set. That has caused a regression, in cases where - the QDialog has a QWidget child with a Qt::StrongFocus policy, and - the QDialog is not yet visible, so focusWidget() returns nullptr. Amend d44413d526ec12ed83acd7343c2005782178c7ad: Implement a helper in QWidgetPrivate, that returns true, if a child with a given focus policy is found. Do not set focus to a QDialogButtonBox's automatic default button, when - not located inside a QDialog, or - a focusWidget() exists, or - the dialog has QWidget child with Qt::StrongFocus, that is not a child of the QDialogButtonBox. Add an autotest function. Pick-to: 6.5 Fixes: QTBUG-121514 Fixes: QTBUG-120049 Change-Id: I3c65ae36b56657f9af4a3a4b42f9b66e8bc5c534 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 78a3301372fb9b48dc65b18a19731db37abab75c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 1e89a6e587637b9ede469f5d49fda62e2f1aa54e)
* CMake: Avoid dsmyutil warnings on shared libraries using libjpegAlexandru Croitor2024-03-161-8/+28
| | | | | | | | | | | | | | | | | | | | | | | We link object files with the same names into the BundledLibjpeg static archive. This caused warnings when running dsymutil on shared libraries using that archive: skipping debug map object with duplicate name and timestamp could not find object file symbol for symbol _jpeg_start_compress Avoid that by creating copies of the source files with different names, so that all object files are unique. Pick-to: 6.5 6.2 Fixes: QTBUG-123324 Change-Id: I1d4ebdd111b4172cde793671fbe059957f102871 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit b72158daf502e1f7f0d8c585df6923b4d958cb94) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 9eb01b53642384a2e072c20ffaae13cd850a2a0d)
* Windeployqt: prevent output for --list optionTimothée Keller2024-03-161-4/+5
| | | | | | | | | | | | Some outputs weren't guarded with the optVerboseLevel which caused them to occur even with the --list option. Add a guard to prevent for that. Fixes: QTBUG-122257 Change-Id: Ide060cda4ac6f9b4470ca608120e2b8aa4819de5 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit ad2da2080c8b99665cd32237ab365fee5461cf66) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 32ce7fa8d29cef4c0154c0fd2278a923a38225ef)
* Fix offscreen rendering in QOpenGLWidgetInho Lee2024-03-161-3/+5
| | | | | | | | | | | | | | | | Amends 68a4c5da9a080101cccd8a3b2edb1c908da0ca8e In a case sharing QOpenGLContext, offscreen renderings cannot get QOpenGLContext from Rhi. Fixes: QTBUG-123005 Pick-to: 6.5 Change-Id: I9baae5e5c77878885f73ee39df5cd39117e8f1c2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit 50c81f549030aba3c29f8cd161662b019028e91b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 2bbfa7f18df6086c4090fa2f3823c929a1bf4ba5)
* Fix QTextEdit/QPlanTextEdit palette not updatedMike Chen2024-03-162-9/+9
| | | | | | | | | | | | | QPlainTextEdit/QTextEdit, etc. never received ActivationChange when used as child widget. Set palette to control on WindowActivate/WindowDeactivate Pick-to: 6.5 Change-Id: Iae75d9dcfba0c6171c556626551b37d4549006c7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 402cb510e1d40825d74447af831918f4a2a951f2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit dd52aed32026efd169c31703209cc7d375548e48)
* wasm: Dont access QNetworkReply header data through dangling pointerPiotr Wierciński2024-03-162-2/+2
| | | | | | | | | | | Fixes: QTBUG-122893 Pick-to: 6.5 Change-Id: I3768fdffaec7be4ec0b559fdb365600220e648d1 Reviewed-by: Lorn Potter <lorn.potter@gmail.com> (cherry picked from commit a5b00cefef12999e9a213943855abe6bc0ab5365) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 9a59f6bc574e3b9dfa09ac33e6dd951f105f87bb) Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
* SQLite: Update SQLite to v3.45.2Christian Ehrlicher2024-03-163-85/+218
| | | | | | | | | | | [ChangeLog][Third-Party Code] Updated SQLite to v3.45.2 Pick-to: 6.6.3 6.5 6.2 5.15 Change-Id: I3b841bc009f2e0ed6dcfa1b93cbb8bce0cd9ad47 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 91f8d1de37aa3a74af83ed997c1686f10e2fed72) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 9478e25284ccd04208c384d026ee3740ddcd82fd)