summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT6.2.0Iikka Eklund2021-10-011-1/+1
| | | | | | | | Current value should be empty to reflect the branch status. Pick-to: 6.2 Change-Id: I7b99546f1f57be72b7be05057fc5c4291dd4b6a8 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Add docs for qt_extract_metatypes()v6.2.0Craig Scott2021-09-242-20/+85
| | | | | | | | | | | | Also tidy up the inline TODO comments to reduce duplication and address some minor inconsistencies. Task-number: QTBUG-95712 Change-Id: Ic0d27f3c0a356fd311bba95de967faaea05e0f0a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 03104825d2187eca12fbfd142001618c8535eb76) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Update Microsoft's Documentation LinksLuca Di Sera2021-09-244-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | The documentation links on `msdn.microsoft.com` now redirect to `docs.microsoft.com`. While the redirection works, our script to catch broken links on dev-snapshots builds of the documentation doesn't handle redirection correctly, reporting it as broken. Both to appease the broken-links script and to avoid an unneccesary redirection, the links were modified to point to the equivalent address in the new domain. Furthermore, the link to the `Winsock 2 Socket Handle` was moved to be an `\externalpage` link, as it was used in two different places. Additionally, the `\externalpage` link titled `Dirext X SDK` was removed as it was not used in any part of the documentation. Task-number: QTBUG-96127 Change-Id: I07f0ae8d610a7f8322b892a2fa37a5cc1769289e Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit fc73b585f8c0a6b08c2f931ac557793b74c5204a)
* Add docs for qt_set_finalizer_mode()Craig Scott2021-09-244-20/+116
| | | | | | | | | | Task-number: QTBUG-95712 Change-Id: Ie7b9282cfc6a27415db5e623a66317c9681c3991 Reviewed-by: Luca Di Sera <luca.disera@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 3ce0672143d2eb3c3809f82998a4d71c5800d77a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: fix error when signing bundlesAssam Boudjelthia2021-09-231-1/+1
| | | | | | | | | | | | | The jarsigner command that was being used was malformed before the file path leading to wrong signing command. A sample of the malformed command part "-storepass password⍣/path/to/package", note the char after 'password'. So having auto produces a QStringBuilder that's returning the malformed char. Fixes: QTBUG-96838 Pick-to: 6.2 dev Change-Id: I5477f6913a74d79ebaf029ef7f4e2745c9f7ced0 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* QThread: Work around potential crash during objectName accessFabian Kosmale2021-09-232-3/+14
| | | | | | | | | | | | | We access objectName from a different thread than the thread which owns it. This is inherently racy, but was apparently not an issue in practice before. With the new binding system, we however seem to encounter a case where we do run into issues. This patch migitates it by bypassing the binding system (using valueBypassingBindings). Task-number: QTBUG-96718 Pick-to: 6.2 dev Change-Id: I9d8f2354ae282893a32c8a23381d0056ceef7c40 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Document qt_add_library() and update related docsCraig Scott2021-09-234-13/+186
| | | | | | | | | | Task-number: QTBUG-95712 Change-Id: Ib107110457380a2bb30876cf2c565f0c8e8c5e9c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit f82653c9735909f60efc6379abdb24803926ffa3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add docs for qt_add_plugin()Craig Scott2021-09-233-9/+88
| | | | | | | | | Task-number: QTBUG-95712 Change-Id: Ifdc10c7714e91f6211a52bd5c46b3140485bbb43 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io> (cherry picked from commit 7fd9981f4d805832078fc8fa443a358caa0ff60a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QFileSystemWatcher: fix QWindowsFileSystemWatcherEngine crashesTim Jenssen2021-09-231-1/+2
| | | | | | | | | | | | | | | | | | | Since QHash in Qt6 does not guarantee stable iterators after an insert it crashed from time to time. - possible crash at the erase call if pit is invalid - possible crash at insert if pit is invalid QHash<QString, int> myHash; auto i = myHash.find("foo"); myHash.insert("foo", 789); i.value(); // possible crash myHash.erase(i); // possible crash Pick-to: 6.2 dev Task-number: QTBUG-96790 Change-Id: Ia9b53d46b8d1fef81ab5a130c229bc9e936f6521 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* macOS: Don't re-send key event through input method on focus object changeTor Arne Vestbø2021-09-221-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | In 0c2ca26cd9583092f3ade7b18bc2423336a6202b we started re-sending the key event through the input method when we detected a focus object change, to support the use-case of QAbstractItemView opening an editor and changing focus in response to the first QEvent::InputMethod event. Unfortunately this doesn't work as a general approach, because we don't know what the reason was for the change in focus object. For example, a client might respond to a Qt::Key_Return press by changing the focus to the next input element, and re-sending the key event would in that case insert a new-line in the new focus object -- counter to the expectations of the client. Since we can't know the reason for the changed focus object we can't assume re-sending the key event is safe. Task-number: QTBUG-54848 Fixes: QTBUG-96726 Change-Id: Iea8b166385925cd1a05ef62d5cf763638d9f8a67 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit ab4fb3ffd40c0bf694161d955d4a58602b9f1a4c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qmetatype: Fix operator< detection for std::optionalFabian Kosmale2021-09-222-0/+4
| | | | | | | | | | | Amends ca54b741d6edda24773137aacee229db31dd3585. operator< is not constrained in MSVC's standard library, either. Fixes: QTBUG-96690 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Change-Id: Ibcbb9e53a1f9e8b13786f6d8c01489c61d8d2d7f (cherry picked from commit 01d94760d8d34e51e1442682fc151747943c7e25) Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Make QWindow respect minimumSize again on WindowsMorten Johan Sørvig2021-09-211-0/+2
| | | | | | | | | | | Commit 6336b535 accidentally removed a call to applyToMinMaxInfo(). Add it back. Task-number: QTBUG-96441 Change-Id: I26a5d121ed3b4cd9e49e3dd8b371abe71d9a482c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 67b2c849923d16182529fb55c4c805ded2d01615) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Repair broken link to the XDND protocolLuca Di Sera2021-09-211-1/+1
| | | | | | | | | | | | | | | The documentation for QTGUI's `Drag and Drop` links to the XDND protocol, which is used to manage Drag and Drop on X11. The previous link seems to have been broken for a few years and was thus replaced with a link to XDND on Jhon Lindal's site, who is the author of the protocol. Task-number: QTBUG-96127 Change-Id: Ia46b10c7461129491934eb74355f107f96e04383 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> (cherry picked from commit 28157cf24e168cbfa9eac7bdc8f066f435329544) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix loading certificates on Android with OpenSSLMårten Nordheim2021-09-211-1/+4
| | | | | | | | Pick-to: 6.2 dev Fixes: QTBUG-96606 Change-Id: Ic2a55fa65c5dc3c057a4da25c218af5a9861410e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Add docs for qt_allow_non_utf8_sources()Craig Scott2021-09-213-3/+55
| | | | | | | | Task-number: QTBUG-95712 Change-Id: Ie09785ced5b2bf8098ccff3467f32244f32f9195 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 30e2f51dab3dbf86f81b299eea515872e10286ef) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add docs for qt_disable_unicode_defines()Craig Scott2021-09-212-1/+53
| | | | | | | | Task-number: QTBUG-95712 Change-Id: I37a50d9e8a62c7d9c30014692d99ffe2eb9b90fb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 9a7c552831a1117512b2827695af567c71aaf35c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* uic: Add QWebEngineViewv6.2.0-rc2Friedemann Kleint2021-09-201-0/+1
| | | | | | | | | | | This is required to generate the correct import for Python. Task-number: QTBUG-63235 Change-Id: I6aaff82058e3f0a5453da15d8d470f06ad9a5a16 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> (cherry picked from commit 710842f075cd5e226ad9c1474deeb012f1a75d86) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* rhi: Remove Q_RELOCATABLE_TYPE for types with QVLA in themLaszlo Agocs2021-09-203-10/+47
| | | | | | | | | | | | | | QVLA itself is non-relocatable due to self references. (ptr pointing to array[Prealloc] as long as capacity < Prealloc) Seems we shot ourselves in the foot in multiple places with this. Fixes: QTBUG-96619 Change-Id: I57a2ce539b671326cd352dbe57a1f3d4c46a6456 Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 481bc82d5931d5c715c2e889da6f249aa88057de) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Fix broken linksVenugopal Shivashankar2021-09-181-5/+3
| | | | | | | | Task-number: QTBUG-96569 Change-Id: If7e951c3df72a87a04e802a5eadbc01c4d934765 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit 7d475a8656669f1b79e5955549527187f31daf43) Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* CMake: Add option in qt6_wrap_cpp to output a metatypes json fileAlexandru Croitor2021-09-181-5/+34
| | | | | | | | | | | | | | | | | | | | | | | | | At the moment only the Qt internal qt_manual_moc function allows manually running moc and generating a metatypes json file. There is no such functionality available in the public qt6_wrap_cpp and qt6_generate_moc functions. Change qt6_wrap_cpp to accept a new internal option called __QT_INTERNAL_OUTPUT_MOC_JSON_FILES to allow creating and retrieving the associated json file with metatypes information. This is needed to fix qtremoteobjects CMake API which needs to run moc manually and process the metatypes json file. The option is internal because we don't want to introduce new API in 6.2.0. Pick-to: dev 6.2 Task-number: QTBUG-95832 Change-Id: Ic8dd27fc960c3f8dea8c101dfc028db45494953d Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* QStringBuilder: fix warning about memcpying onto QCharThiago Macieira2021-09-171-1/+1
| | | | | | | | | | | | | | | Which is not a trivial class. qstringbuilder.h: In instantiation of 'static void QConcatenable<const char16_t [N]>::appendTo(const char16_t*, QChar*&) [with long long int N = 6]': qstringbuilder.h:402:35: required from 'static void QConcatenable<QStringBuilder< <template-parameter-1-1>, <template-parameter-1-2> > >::appendTo(const type&, T*&) [with T = QChar; A = char16_t [6]; B = QString; QConcatenable<QStringBuilder< <template-parameter-1-1>, <template-parameter-1-2> > >::type = QStringBuilder<char16_t [6], QString>]' qstringbuilder.h:460:52: required from 'QString& operator+=(QString&, const QStringBuilder<A, B>&) [with A = char16_t [6]; B = QString]' /home/tjmaciei/src/qt/qt6-release/qtdeclarative/src/qml/jsruntime/qv4qobjectwrapper.cpp:1762:75: required from here qstringbuilder.h:338:15: error: 'void* memcpy(void*, const void*, size_t)' copying an object of non-trivial type 'class QChar' from an array of 'const char16_t' [-Werror=class-memaccess] Change-Id: Iddb933f281024939b6acfffd1689cf320c84873c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit a20a4240668faa0e6c961b90266918628f9f5484) Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Revert "Qt xcb: remove false detects of Qt::GroupSwitchModifier"Liang Qi2021-09-171-3/+3
| | | | | | | | | | | | | | | | | | This reverts commit 25a7034d78aeb12726a1052d64c0aa3314a1f69d. The change makes the 5th modifier key broken, which is more serious than Backspace key doesn't work in CapsLock on. And we don't have a better solution for both of them now, perhaps it's better to keep the old behavior in 6.2 LTS. Task-number: QTBUG-49771 Fixes: QTBUG-95108 Fixes: QTBUG-95289 Change-Id: Ie5d0aafa562b5097e089cafc83ae227c75c6d752 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit bb4b40b7e1b7cc0af2f0c74a991edf39d64cac06) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Rewrite Qt Resource System overviewKai Köhne2021-09-1712-178/+332
| | | | | | | | | | | | | | | | | | | | | | | | | Restructure the Qt Resource System page to make the content more accessible, and coherent: - Focus less on the .qrc file format, but the overall use cases - Treat CMake as first-class citizen - Make it more obvious when to use :/, and when qrc:/ Some details that were deemed unnecessary were removed: - details about the internal naming of the .cpp file when qmake is used. - References to QDir::addSearchPath() and the search path list were removed. They relate IMO only indirectly to the Qt resource system. - A lot of the explanation around Q_INIT_RESOURCE/Q_CLEANUP_RESOURCE were dubious at best. Fixes: QTBUG-95126 Fixes: QTBUG-94977 Fixes: QTBUG-59394 Task-number: QTBUG-88044 Change-Id: I04b64f2366631b2106f047de121daf5fdb01073d Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 643b58a4298f5a901674658f5937f55ca4a83205) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Allow destruction of QWinEventNotifier in its signalv6.2.0-rc1Alex Trotsenko2021-09-131-1/+3
| | | | | | | | | | | | | Avoid use-after-free issue in QProcess. Fixes: QTBUG-96285 Fixes: QTBUG-96359 Change-Id: I953d7a8ecaf301ec3a27db37e13748f905c3d097 Reviewed-by: Christoph Cullmann <cullmann@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> (cherry picked from commit 4e0082a9cacfdfd0c43e6105274bc0d41dd18801) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* qdevice.pri: Use cmake separators for the pathMårten Nordheim2021-09-111-0/+2
| | | | | | | | | | Because otherwise we may end up with trailing backslashes Change-Id: I7ad24ec34c35f0a7b32241751bbcd2b26a8a23ea Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit a2653331330340c4f44457c49005f4c7226b8316) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Set Qt::SubWindow on windows embedded by QWidget::createWindowContainerTor Arne Vestbø2021-09-101-0/+2
| | | | | | | | | | | | | | | | The embedded window is parented into the containing QWindowContainer widget, which may either have a window handle itself, or is a child of a widget that has one (typically the top level). By setting Qt::SubWindow we inform clients about the embedded window's place in the world, allowing e.g. QPlatformIntegration::defaultWindowState to choose the correct state (Qt::WindowNoState) for the window instead of making it Qt::WindowMaximized on iOS. Change-Id: Icf834192d99fee455aaba3c57bee1a4f1fde5025 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit 296621a52f220dfd5456f6fb936f513a7b85b1af) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Always give Qt::SubWindows a default window state of Qt::WindowNoStateTor Arne Vestbø2021-09-101-0/+3
| | | | | | | | | | | On platforms such as iOS, the default window state is Qt::WindowMaximized, so that calling show() will fill the entire screen. But sub-windows should not get this treatment, as their geometry is typically managed manually. Change-Id: Ib17c2011a16baf6023fe368b94fa7f38e12bd777 Reviewed-by: Lars Knoll <lars.knoll@qt.io> (cherry picked from commit c066cd260087199ed309600d1b924af270cc3a14) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix binding guard in property evaluationIvan Solovev2021-09-101-9/+9
| | | | | | | | | | | | The comment for keepAlive means that it should be destroyed after the updateGuard goes out of scope and restores its value. In this case keepAlive should be actually created *before* updateGuard, not after it. Task-number: QTBUG-96303 Change-Id: I4f8e67b49c1d6579228e22111105fb936f1f94db Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 248f0aad1c4f1c6e7e03ad265c2011390dca75ef) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Avoid implicit linking of plugin init library if finalizers were calledAlexey Edelev2021-09-101-0/+2
| | | | | | | | | | | | | | | Propagating of plugin init libraries should take into account plugin finalizers to avoid duplicating of object files in a linker line. Fixes: QTBUG-96062 Change-Id: I48feac94b08a7eb08d84134e9e9ae6e7214f5bdd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 7e794d71c0bf0f6e812aa1c7794b709889f202fd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit 2ad29c0a3ae1252c6c30eaca2aa06c131a67f819) Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Move some CMake commands out of tech preview statusCraig Scott2021-09-102-4/+0
| | | | | | | Task-number: QTBUG-95712 Change-Id: I6739e5d2fb4716f40e99576a73f57bca51060e92 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 9ad8d2c0d4fe4edbbdc9619ba1c6a25a66dcdcd3)
* Add documentation for the NO_DEFAULT option for qt_import_plugins()Craig Scott2021-09-101-1/+5
| | | | | | | Task-number: QTBUG-95712 Change-Id: I3ba7fa52fa38c2ee1f9080f91894c36504a4f451 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 1fed96d19f8f0a4a7d56117a22d67396d0aa26ac)
* Remove inline docs for qt_import_plugins() to avoid duplicationCraig Scott2021-09-102-19/+2
| | | | | | | | | | | | | | | Don't maintain two copies of the docs for qt_import_plugins() in separate places. Remove the inline docs because they are not the canonical ones that the user docs contain. Also remove the TODO and qml plugins. Those are now handled by a separate command, qt_import_qml_plugins(). Add a "see also" link to assist in discoverability. Task-number: QTBUG-95712 Change-Id: I3bb872f77a1b57fd5f2f4fe1355625c47e44a351 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 2e4d8d8ec52a56470beeb43b8f08f12953a17d4f)
* xcode: Allow automatic provisioning updates when calling xcodebuildTor Arne Vestbø2021-09-091-0/+4
| | | | | | | | | | | | | | If automatic signing is enabled (which it is by default), then Xcode will happily set up the required profile if you open and run the application in Xcode. To get the same behavior for xcodebuild, and hence from Creator, since it's calling our Makefile wrapper around xcodebuild, we need to pass the -allowProvisioningUpdates flag to xcodebuild. Fixes: QTBUG-95565 Change-Id: I9325bb228bdfb4d07658eff8f41798f7b5a6955c Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 16b11bb81eb02f182e3570c9241f57c5689fb90e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove unused qt5_... CMake command snippetsCraig Scott2021-09-091-38/+0
| | | | | | | | Task-number: QTBUG-95712 Change-Id: I92535fd96937638bb8997a63455ba5152055b72a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 2ad35d133a8d71d4ce21e25df7b12b70cc2f8151) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Split up cmake-macros.qdoc into one file per commandCraig Scott2021-09-0912-633/+893
| | | | | | | | Task-number: QTBUG-95712 Change-Id: Ieeb4293fb8d17c57fb25e0ac5cd333b07fc53278 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 944c424ff601fe546a0ac83e0d8b3f781beb68f6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update Qt5:: namespaced targets in snippets to versionless Qt::Craig Scott2021-09-091-4/+4
| | | | | | | | | | | | | The docs for CMake commands all show the versionless commands as the primary name, with versioned commands added as a note. Use the same preference for targets for consistency and update the Qt5:: namespaces to Qt:: rather than Qt6::. Task-number: QTBUG-95712 Change-Id: I6bf1929a11656f88e27bb5877e9521a3a651361e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit afb7d3b814ee30ae9673a925612fcd2ed676c661) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Move CMake-related doc files into their own subdirectoryCraig Scott2021-09-093-0/+0
| | | | | | | | | | | This is in preparation for splitting up the cmake-macros.qdoc file into one file per command. Task-number: QTBUG-95712 Change-Id: I9e56b88139cc6a53cd03cbed3d14404577f89faa Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 5b58fbf9a2aa1027fdbe4ade0f796775cc4b0a24) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Clear up QWindow::isActive() documentationTor Arne Vestbø2021-09-081-1/+3
| | | | | | | | | | | The isActive function does not determine if a window should be active, but whether it is currently active. The way the documentation was phrased may have lead people to believe the former. Change-Id: I05a4cb3d8784a2fefa24bdd42ea96cfdae22b9d1 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit c138f55591ff916bad51ff3f80350df0587b1115) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* SQLite: Update SQLite to v3.36.0Andy Shaw2021-09-083-2976/+4341
| | | | | | | | | [ChangeLog][QtSQL][SQLite] Updated SQLite to v3.36.0 Change-Id: I05cde47b757455dfd438405bfba1818c7f6eec00 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit b919fc8fd038bd04a88717269dce1fdf443af442) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* rhi: Reset resource state tracking tables upon layout-compatible updatesLaszlo Agocs2021-09-073-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...just like create() would do when requesting a full rebuild. Not relevant for the OpenGL backend, while D3D and Metal may get away without doing this, but the Vulkan backend gives visible rendering errors in Qt Quick once updateResources() is taken into use and a scene manages to do the "right" amount and types of changes. The most common source is a changing uniform buffer offset. Consider how the Qt Quick scenegraph merges uniform data into a single buffer in unmerged batches (i.e. when a set of geometry nodes cannot be batched together in a single draw all). While each node gets its own draw call, each associated srb refers to the same uniform buffer at binding point 0, just with a different offset. Without the layout-compatible-update optimization (that is QRhiShaderResourceBindings::updateResources()) this is not something that needs extra care: once an srb is built or rebuilt (by calling create()), the offset, just like the resource itself is fixed and cannot change. And once create() is called, it conveniently invalidates all related data structures, leading to the subsequent setShaderResources() rewrite descriptors (incl. the resource, the offset, etc.) with Vulkan or do whatever is relevant with other backends. updateResources() only does the minimum amount of changes because we know that the binding list layout has not changed. It turns out this was a bit too minimal, because certain state tracking data structures still need resetting, just as if we called create(). The problem is becoming apparent with non-layout data such as the uniform buffer offset, storage buffer offset, or the storage image mip level. It however works as expected when changing the resource itself. E.g. if a binding point now references a QRhiBuffer different than before, then there is no visible problems, regardless of the buffer offset being different or the same. Hence being difficult to discover, until the aforementioned Qt Quick renderer case triggers it. Why is this? Changing the resource (buffer, texture, sampler) itself works due to the guarantees given by the QRhi resource model. Consider the following: ubuf is a uniform buffer ubuf->create(); srb->setBindings({ references ubuf }); srb->create(); // use the srb in some draw calls // ... // later, when preparing the next frame we decide we need new data with // a different size even: ubuf->setSize(new_size) ubuf->create(); // fill in new data to ubuf // use the srb in some draw calls at this point "magic" happens: note how there is no rebuilding of the srb itself (no create(), no nothing), yet it will correctly pick up the now-different native buffer objects underneath ubuf. This works because there is a certain degree of state tracking happening that allows recognizing that a resource referenced from an srb got rebuilt and now has different native objects (e.g. a VkBuffer) underneath, which in turn needs (with Vulkan) rewriting the associated descriptor with the new native resource. Incidentally, this also makes updateResources() work just fine as long as it replaces the QRhiBuffer/Texture/Sampler reference for the binding point. However, with the example snippet above there is no way to change the other associated data such as the buffer offset. (that would need rebuilding the srb with create(), and that resets all related state tracking structures) So once we encounter an updateResources() where the same QRhiBuffer is now used with an offset different from before, that is not recognized by setShaderResources() and (with Vulkan) it will not rewrite the descriptor with the new offset. (unless the changes for another resource in the binding list trigger it; the granularity here is quite coarse, i.e. we either rewrite (with Vulkan) all descriptors or none at all; this makes the problem even less apparent because now rendering errors occur only when Qt Quick ends with an update where only the uniform buffer offset, but nothing else changed) Change-Id: I82ee43aa358947288135ff72ec213e091342e9cb Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 19febad9f2f9a9afe0128f7568f3cc41d759db1c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* rhi: Improve srb layout serialization helpersLaszlo Agocs2021-09-073-3/+13
| | | | | | | | | | | | Be idiomatic and return the output iterator one past the last element. Otherwise passing in a plain pointer (as exercised by the autotest now) fails to function because we write over the same 4 elements again and again for each binding. Change-Id: If74463fa5140ffa2b1d5be97b71868848ad46614 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit ce9d0491f2a3836991c3c44fa70c32f1f606ab28) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Cocoa: Make sure we can display multiple sheets for the same NSWindowDoris Verria2021-09-071-1/+5
| | | | | | | | | | | | | | | | On macOS, to display a modal with Qt::WindowModality set, or of type Qt::Sheet, we call beginSheet:completinHandler:. However, this method won't display the specified sheet unless the current active one is dismissed, which is a different behavior than what we expect for this case. Use beginCriticalSheet:completionHandler: whenever we already have an active sheet attached to the NSWindow, which allows us to display multiple sheets for the same window. Fixes: QTBUG-91059 Change-Id: I86bdbcbd63758edbbc48a8aade0178917dcb0e5b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit f3bc1f850046341745d42e2d6739724321634891) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Allow building android{deployqt, testrunner} under target host_toolsAssam Boudjelthia2021-09-074-11/+18
| | | | | | | | | | | | When doing a cross build for Android we need only the host tools which are available under cmake's host_tools target, but androiddeployqt and androidtestrunner are not part of that. This fixes that. Change-Id: Icdbc4a78ca050b66ec8df656d9ec766ef6c9f4b9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 7dc05252a0df829bb5ea3994160d425bb0da26cb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix compilation for recursive Qt containersSona Kurazyan2021-09-078-32/+204
| | | | | | | | | | | | | | | | | | | | | The operator checks cause compilation errors when trying to check for their existence for recursive containers. This happens because of trying to check for the operators on the template parameter type(s), that inherit from the container itself, which leads to compilation errors. Introduced alternative versions of the operator checks (with _container suffix), that first check if the container is recursive, i.e. any of its template parameter types inherits from the given container, and skips the operator check, if that's the case. The fix is done for all Qt container types that had the problem, except for QVarLengthArray and QContiguousCache, which don't compile with recursive parameter types for unrelated reasons. Fixes: QTBUG-91707 Change-Id: Ia1e7240b4ce240c1c44f00ca680717d182df7550 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 9f13842fe61541cb8ab9822174ea963e418b5537) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* rhi: Enable serializing a layout description without baking an srbLaszlo Agocs2021-09-073-10/+40
| | | | | | | Change-Id: I66d28cc9d5417bcd5d192fa100c21f69fd42fd6b Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 4cde0e484c009415397430050cde389fb9b445b6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* rhi: Make the serialized srb layout description accessibleLaszlo Agocs2021-09-073-1/+30
| | | | | | | | | | | | | | | | | | | | | | ...by the Qt Quick renderer, for example. A typical Qt Quick material binding set serializes to 8 uints. This would not demand a container like QVector. However, being implicitly shared is essential here due to the intended usage (query the serialized blob, put it into a cache key, hash it, compare it, all without any copying and new allocs; we can afford an extra alloc upon each srb construction, but don't want more afterwards in the rendering engines) Also make it clear in the pipeline docs that the optimization Qt Quick is (soon going to be) doing is legal. (the srb ref in the pipeline can be dead and dangling as long as every call to setShaderResources() specifies a layout-compatible alternative) Change-Id: I97efbea1fa3516b10c9832adbab0a21b7bc0845d Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit b6b0c33058ba7f43661e316d9f27d4102f6a988f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QPaintEngineEx: solve compile errorZhang Hao2021-09-071-1/+1
| | | | | | | | | | Use the same variable name in function Amends 6869d2463a2e0d71bd04dbc82f5d6ef4933dc510 Change-Id: If710a53993e84d048f9052f4fcf92eb57635f585 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from commit cca8ed0547405b1c018e995ad366ba0ab4c2a0e8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Copy and install lldb QtCore.py script for lldb and Xcode useAlexandru Croitor2021-09-071-2/+26
| | | | | | | | | | | | | The file was not handled during the qmake -> CMake transition. qmake had a more generic mechanism to allow embedding dSYM scripts per Qt module, but it wasn't used as far as I know, so the CMake implementation only limits it to QtCore. Change-Id: Ibcd818df1897f603ac194092b28d4bd4d1d6c6ae Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit c2a2522089942f8a50237c9dac8cbd9b713d1fb5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* wasm: fix network data URI schemeLorn Potter2021-09-071-2/+0
| | | | | | | | | | | Inadvertantly ifdefed out. Tested and works fine Fixes: QTBUG-96170 Change-Id: Ib26cf76a548146d4212c48b228965348038f34e8 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit 70b9e0687b501f1602b0c4251cda50ddddfb6712) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix lldbbridge.py loading when using lldb + Python 3 from CLIAlexandru Croitor2021-09-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | or from Xcode. A command line lldb that uses python3 fails to load the 'utils' module dependency when importing lldbbridge.py via the dSYM script debug_script.py. Add the directory where lldbbridge.py is as an additional import path to sys.path. This fixes the bridge to load in both CLI lldb and from within Xcode. Traceback (most recent call last): File "src/corelib/debug_script.py", line 92, in __lldb_init_module bridge = import_bridge(bridge_path, debugger, session_dict) File "src/corelib/debug_script.py", line 42, in import_bridge bridge = imp.load_source(MODULE_NAME, path) File "Versions/3.8/lib/python3.8/imp.py", line 171, in load_source module = _load(spec) File "<frozen importlib._bootstrap>", line 702, in _load File "<frozen importlib._bootstrap>", line 671, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 783, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "Qt Creator.app/Contents/Resources/debugger/lldbbridge.py", line 34, in <module> import utils ModuleNotFoundError: No module named 'utils' Amends 1b73c202ce907cd03864413f472bfeb5abf5151e Change-Id: I521d7530e35ee9c51ae0418d2c532e58ec1952d0 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit fc038ef44561b6fa60adf40ada84d9337e76808c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>