aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* QQuickScrollBar: ensure '0 ≤ size ≤ 1' and '0 ≤ minimumSize ≤ 1'Oliver Eftevaag2022-03-072-8/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It doesn't make sense for these properties to be negative or larger than 1.0. The size property is meant to be the size of the scrollbar relative to the scroll area size, either horizontally or vertically, and should be in the value range 0 ≤ x ≤ 1, where 1 means that it covers the whole scrollbar area, and 0, meaning it's invisible. This property can be set from qml, or by QQuickFlickable with a scrollbar assigned to the Scrollbar.vertical or Scrollbar.horizontal properties. The minimumSize property can be set by the qml user, to force the scrollbar to be larger than the Flickable size / contentSize ratio. It makes sense to force the 0 ≤ x ≤ 1 constraint for this property's value as well. amends ef69623648f6f5ef5ab10dd9dee72f044334d53d As an additional sanity check, I've added a qt_is_finite() check for all qreal properties as well, just to prevent our API users from accidentally setting a property to an invalid floating point value. Change-Id: I9f2880333483bf584986801d6b7204fea8d66e58 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> (cherry picked from commit 0e4444a74a4259ec0871ec95d3804a0bbaf3b30f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix selectedFiles being empty for native FileDialogsMitch Curtis2022-03-072-0/+10
| | | | | | | | | | | This code was mistakenly removed in 13399bd54d084ed837ec061ca9315dbd173f3b48. Change-Id: Ibbae3fb51e324df0991123c8a083537e1bf76745 Fixes: QTBUG-101170 Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 3849e0de268bc8c579769b7770b98a07c2c21d0c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove pointer manual test from the buildShawn Rutledge2022-03-051-1/+0
| | | | | | | | | | | | | | Followup to 8503f884bbdb50c4bebc8f8a9fce05275b0612b1: much of the qml was moved to an example, and the leftovers in this directory no longer include the main.cpp/main.qml/CMakeLists.txt for building a standalone executable. It's generally enough to run them individually with the qml runtime, on desktop platforms at least. Task-number: QTBUG-101451 Change-Id: I4b329d0fabb398308c411246f34789d66e7eda33 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 754e971d1d2a15ebd89430b1572912566417625b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Rename android_dummy_imports.qml to dummy_imports.qmlAssam Boudjelthia2022-03-0524-39/+39
| | | | | | | | | | | | | | | | | Amends 16f0d38d568b3af135f5db862f5868a6bc669c42. From 0fc8a511baa6493c8d80046dd99b8eba3634d2a2, it seems that not only Android is relying on these imports to satify qmlimportscanner, but also Integrity. So rename the imports to something generic and remove the explicit mention for Android. Task-number: QTBUG-97056 Change-Id: I9273fd0f9201a805cad4d588847796f7daecb686 Reviewed-by: Kimmo Ollila <kimmo.ollila@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 841217b9883a24919ab375a90a7fef41cc82b44c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Reduce the length of Int8Array in tst_QJSEngine::typedArraySet()Assam Boudjelthia2022-03-051-1/+1
| | | | | | | | | | | | On 32-bit Android x86 using a length of 0xffffffe throws an "RangeError: ArrayBuffer: out of memory" instead of the expected "RangeError: TypedArray.set: out of range". Task-number: QTBUG-99193 Change-Id: Id6deea18fe90228db616ddc7550c7832825c297a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit c67e7922f2b21453b37e7e2397863c449a5e415b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* ExecutionEngine: Move initialization of statics into separate methodUlf Hermann2022-03-052-68/+87
| | | | | | | | | | | ... and do it only for the first engine (ie engineId == 1). The engineId is determined using atomic operations, so this is safe now. Task-number: QTBUG-73271 Change-Id: Ife38213fe04e26f35425a29230a2e3b586572dd2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 6fb63032966cc27cc11ce3686e97b185fdb3cb6b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickMaterialStyle: Fix bogus revision declarationUlf Hermann2022-03-051-1/+1
| | | | | | | | | | | When using two-component revisions, we have to use them everywhere. Change-Id: I6bae8914a56ed27ed82479548d229cb8ce4fec19 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 3d37b0baf5bb40fd97b62ad6bd8f3c2b5eb5f016) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QNX: Fix compiler warnings about unused parametersPasi Petäjäjärvi2022-03-052-0/+5
| | | | | | | | | | | | | | warning: unused parameter 'usage' [-Wunused-parameter] warning: unused parameter 'writable' [-Wunused-parameter] warning: unused parameter 'executable' [-Wunused-parameter] warning: unused parameter 'lineCount' [-Wunused-parameter] Fixes: QTBUG-101383 Change-Id: I22089b1aeea927468e61769dcbbc8e363b9d734e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit a90d624f0eb96921141f421555b4f7dde4026afd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QML: Handle dynamic meta objects in AOT lookupsUlf Hermann2022-03-048-82/+419
| | | | | | | | | | | | If we are dealing with dynamic metaobjects, the QML engine may not create property caches. We cannot see this at compile time. Therefore, we need to establish a fallback infrastructure that does the same operations on plain QMetaObject. Fixes: QTBUG-101349 Change-Id: I8c936fc077b0018df71196620b6987825253cb39 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 1e722f5e8e6510f3a1bc10436f8262c918ca9599)
* Update dependencies on '6.3' in qt/qtdeclarativeQt Submodule Update Bot2022-03-041-5/+5
| | | | | Change-Id: Ibaa119550ca3ff7f0c1aecf99d02032b4248a459 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* INTEGRITY: Fix some test cases from core/qml foldersKimmo Ollila2022-03-0322-4/+88
| | | | | | | | | | | | | | -Add dummy_imports.qml to TESTDATA -Let qmlimportscanner handle plugin import -Skip cases that depend on mounted filesystem Task-number: QTBUG-99123 Change-Id: I99e21e423f2114c4c4ee1e24bdf9bb85af51baf7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 0fc8a511baa6493c8d80046dd99b8eba3634d2a2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QmlCompiler: Optimize metaobject retrieval some moreUlf Hermann2022-03-031-2/+2
| | | | | | | | | The QObject one didn't take effect, and we don't need the metatype to get a metaobject for QObject or QQmlComponent. Change-Id: Ib047d958a79659fe7c5904b2fdc25b72e69b7b2b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 83a2e80971af69c0b54edc79877016abfd3478b9)
* QmlCompiler: Don't generate code for untyped JS callsUlf Hermann2022-03-035-2/+23
| | | | | | | | | | This is inefficient. Task-number: QTBUG-101285 Change-Id: Iec7f02b4b95cb788c710a3634c2344843b125030 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> (cherry picked from commit 6e8f6f446ac8854fd23cb3cbf0fc1f3646299ca6)
* QmlCompiler: Correctly label return types of JS functionsUlf Hermann2022-03-035-2/+35
| | | | | | | | | | Returning void from any JS function doesn't quite cut it. Fixes: QTBUG-101285 Change-Id: I199813627614061ec25139277e8ea23cb844aac5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> (cherry picked from commit 23ab2e0f5552bb54fef5a6c57f5f82f430d0956c)
* QQuickAnchorChanges: Keep geometry bindings on reverse() and rewind()Ulf Hermann2022-03-034-15/+100
| | | | | | | | | | | | This is in line with what we do in other reverse() and rewind() methods. Unfortunately we need to dig deep into the QQuickItem internals in order to get all the flags and callbacks right. Fixes: QTBUG-101186 Change-Id: Icde1a1b2dab1b9cab5adcbc28485a7526a8ac2b7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 247efb9a343a14bb12805e56e4950919071d9395) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qmltyperegistrar: Tolerate and warn about invalid URIsUlf Hermann2022-03-022-2/+21
| | | | | | | | | | | | | If you give qmltyperegistrar an invalid URI it should still not generate invalid C++ code. In fact the module will still be somewhat usable. You just cannot import it. Task-number: QTBUG-101072 Change-Id: I21232f99c1ef486a62dbe339f7d0ae1b9abc8871 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 88e96debfdad3961db3225de7b4c7f90afe7698e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QmlCompiler: Optimize some more type conversionsUlf Hermann2022-03-021-10/+67
| | | | | | | | | | Some of those make the compiled code slower than the interpreted code. That is bad enough of a bug to pick it back to 6.2. Fixes: QTBUG-100847 Change-Id: I823ff688d3aead364e21ae1e90e16a4bfaedb1f5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit dddd6a66ddd77d3887c52cb145e7e14b8fb542b9)
* QML: Explicitly reject malformed file importsUlf Hermann2022-03-025-0/+56
| | | | | | | | | | | You cannot just pass a resource path or absolute path. We expect a URL after all. A relative path is a relative URL, so you can pass that. Fixes: QTBUG-98181 Change-Id: I010bc08b8cb0ff06712f7b0353955bee96ae36c1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 1240a440f29762850a9206bdf9961cebe015c1fa) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Disable failing declarative tests on Android - Part 2Assam Boudjelthia2022-03-026-2/+30
| | | | | | | | | | | | | | | | | This allows us to enable testing on declarative for the module as a whole and have some sort of test verification for the mean time, and fix the fails over time. This also disable tests like qdom and qjsscope which are host tests. Task-number: QTBUG-100991 Task-number: QTBUG-99194 Task-number: QTBUG-101005 Task-number: QTBUG-101006 Change-Id: Ie7ae5b8e0ccdf2f55ce3568091d513a073c48417 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 6c3373109fedf45b06c9c48355a80922fd754b31) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* A11Y: make QQuickText focusable for A11YIvan Solovev2022-03-023-3/+10
| | | | | | | | | | | | | | | | | | | | | | | A QtQuick Text element is used to represent a separate block of text in a window. Normally, when TalkBack is enabled, the user expects to be able to navigate between separate blocks of text with regular A11Y gestures. However before this patch the Text elements were not focusable by default, so all the Text elements in the Window were read by the TalkBack successively, as if it was one element. This could be solved by explicitly adding Accessible.focusable: true to the properties of every Text element. This patch enables A11Y focus on Text elements by default. Fixes: QTBUG-77371 Change-Id: Icfcef6ee301b9218bb9ace97a05432c9fc2ffb0a Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 9c5f772b5eb008cd0d00a0801b80a399fdc0e3c9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix tst_qquickaccessible::hitTest() on AndroidIvan Solovev2022-03-021-1/+2
| | | | | | | | | | | | The issue was that on Android the main windows always takes the whole display size, so the width and height properties are ignored. Task-number: QTBUG-77371 Change-Id: I6942235498d47ac945287a607e267e86a9a2069b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 7b005273804d79b0a5943a4803b51f2093280367) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: unify the android tests dummy import filesAssam Boudjelthia2022-03-0242-148/+184
| | | | | | | | | | | | | | This renames all qml files added before to allow qmlimportsanner to include the necessary modules into Android packages, into android_dummy_imports.qml, and also adds a comment in each one describing why it's needed. Task-number: QTBUG-97056 Change-Id: I7fc0514dd9e5bc10849fdd0503547e1a75242414 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 16f0d38d568b3af135f5db862f5868a6bc669c42) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickText: fix fractional pointSize rounding error bugOliver Eftevaag2022-03-024-26/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The layout is initialized with a copy of the current font before the laying out begins. In cases when setupTextLayout() iterates through the main loop multiple times, it will update the layout font, if it differs. (See code below) if (!once) { if (pixelSize) scaledFont.setPixelSize(scaledFontSize); else scaledFont.setPointSizeF(scaledFontSize); if (layout.font() != scaledFont) layout.setFont(scaledFont); } The whole reason why we might update the font in the first place, is because the QQuickText has a fontSizeMode property which can be set to e.g. HorizontalFit, which will cause the layouting to downscale the font in order to fit (assuming the text doesn't fit the space available), instead of eliding. The problem here is that QFont internally uses a float to store the point size, and we would convert that value to an int when temporarily storing it on the stack. This would modify the pointSize value in cases where the pointSize is fractional, and cause a mismatch between the QQuickText and QTextLayout. The lineWidth is set only during the first loop iteration. During successive iterations of the main loop, the layout's font would be updated to one that has either a floored or ceiled pointSize. If the pointSize is a fractional value, and is ceiled when being updated during the second loop iteration, the layout would use a larger font value, which would cause the QTextLayout::naturalTextWidth() to return a larger value than that of the lineWidth, triggering eliding. Solution: Keep the font precision, by storing the values as floats instead of ints. Fixes: QTBUG-92006 Change-Id: Ibf64ac2dfbf262c6aae05b8eb8251d2f5a869b69 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> (cherry picked from commit ae62122a8f57b1de654e891125f19d2e18d6f5df) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qquickaccessibility: wrap dynamic object allocations into smart pointersIvan Solovev2022-03-021-30/+25
| | | | | | | | | | | | | This helps to prevent memory leaks if some of the tests fails. On Android it also helps to prevent crashes when one of the tests fails. As a drive-by: replace QScopedPointer usage with std::unique_ptr. Task-number: QTBUG-77371 Change-Id: Ib0d12f82d967116569266e6f65367bcf89f66c9c Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 3fb70ea89c813072f8c191298bf2c18efc4bdab5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QML: Add indirect library dependencies for tests relying thosePasi Petäjäjärvi2022-03-0211-1/+11
| | | | | | | | | | | Task-number: QTBUG-101341 Change-Id: I8c9413caf24f1d2afc6678d2432c08ac7da2f1c3 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> (cherry picked from commit ae989a87bc2dad377e4884531f4a1b24dca897f4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Android: various test fixesAssam Boudjelthia2022-03-029-5/+47
| | | | | | | | | | | 2nd round of test failures fixes for Android. Mostly resource bundling related issues still. Task-number: QTBUG-97056 Change-Id: I2fac0710a7b5528fcef4480babd0cbf749e488b3 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 9bdfea7f1f1ffe16c7a1140b09c94b9d72d24f18) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qmltc::listView is failing with no apparent reasonPasi Petäjäjärvi2022-03-021-0/+2
| | | | | | | | Task-number: QTBUG-101342 Change-Id: Ib660394b5956b891b86dd20cab83c80f5274fa43 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> (cherry picked from commit 39855a3ba193f86dd2504c9ec7a8fb4e4d702eb4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: state that desktop support is being improvedMitch Curtis2022-03-021-0/+5
| | | | | | | | | | | As the module was developed for touch interfaces first and foremost, we can state that bringing desktop support up to par is an ongoing process. Change-Id: I769731efbd7131b8ffe47ac1db937808dbb3495b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit f1c2f250162b4b2cd130d2b0e49e50a988d85a11) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qml: Add build qmldir import path of the current module in prefix buildsAndrei Golubev2022-03-021-1/+19
| | | | | | | | | | | | | | | | | | | | | | | Prefix builds with installed qtbase but non-installed qtdeclarative result in default import paths being insufficient: QLibraryInfo::path(QLibraryInfo::QmlImportsPath) would return the install location (e.g. <install>/qtbase/qml/) while QML modules are put into the qtdeclarative's build dir (e.g. <build>/qtdeclarative/qml) This results in qmltc failing to locate builtins and modules and thus failing the build. Same applies (should at least) to qmlsc and qmllint We can mitigate this by detecting whether we build a specific qt module in a prefix-build and add an extra import location. The assumption is that we only build one module at a time (others are installed already) and user projects wouldn't need / experience the same behavior Fixes: QTBUG-98011 Fixes: QTBUG-101163 Change-Id: Ie73e1e6dc39e3afd0056db432eeae012a99b7179 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 6f67326bda744da2c35ee7148177e3872c6e004c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qquickstyleitem: Fix Q_ENUM/Q_FLAG confusionFabian Kosmale2022-03-021-1/+1
| | | | | | | Change-Id: I0e5cf9ce1b905bef2db51dc605232e3bd9f7baf3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 8a632d25f293430d30b642b83f36e8b2ed657ac1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Clean up deployment docs for 6.3Alexandru Croitor2022-03-023-4/+22
| | | | | | | | | | | | | | | Add 6.3 version requirement to doc snippets that use the deployment api. Update the qt_deploy_qml_import doc snippet to show case usage of all the options provided by the function. Fixes: QTBUG-100926 Change-Id: I81abef21cf7b8bfdd09fc53c7b7dacba994bd78c Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 6d0307b443c5f6e40a820e3cfc8c28fc6e5f77de) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Ensure that min <= max in qBound callOliver Eftevaag2022-03-021-1/+2
| | | | | | | | | | | | | | | | | | | | It is not impossible for (1.0 - visualPos) to be negative. Which can cause the max parameter to be smaller than the min parameter in the qBound() call. This is a followup to c77b9bae690053b31c9db110ee5ad6d5741d4511 which partially fixes the issue, but forgot to apply the same change to the statement before it. I somehow managed to crash the dialogs manual test, when clicking around randomly in the FolderDialog. (thus reproducing it might end up being difficult) Task-number: QTBUG-101174 Change-Id: I92b2228f1cf92d3e3d79b05d281e05c765466101 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit f2791ba6290c7d22ac9093a948e0f5bef671247b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Remove INSTALL_SOURCE_QMLTYPES warningAlexandru Croitor2022-03-021-4/+0
| | | | | | | | | | Remaining qml modules that need to be ported to use the new declarative registration are tracked in the linked issue. Pick-to: 6.2 Task-number: QTBUG-99761 Change-Id: I3c8fd9968ebfea10a7277082c34f77b70eede816 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQuickStateOperations: updateGeometry() when setting x/y/w/hUlf Hermann2022-03-013-7/+116
| | | | | | | | | | | | Failing to call updateGeometry() and setting the various dirty flags leads to inconsistent state. Fixes: QTBUG-99436 Fixes: QTBUG-98857 Change-Id: I15240b1670947da29e2f05e7ea41c7586f0b987a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit b81e27e65217f8425acb58c3ac848c728790c872) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QmlCompiler: On MoveReg, check if we need to move at allUlf Hermann2022-03-014-0/+24
| | | | | | | | | | As we don't store void, null and empty lists, moving those is a noop. Don't generate invalid code for that. Change-Id: Ica6714acd0ce8a5ddca44d9a397e776eb3df4247 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 074b66e0073b55d32060ffd542a02c811ad763a8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickLoader: Check for QQmlEngine before using itUlf Hermann2022-03-013-3/+56
| | | | | | | | | | | The loader's context may have been removed from the context hierarchy or it may not have a context in the first place. We should not crash then. Fixes: QTBUG-67950 Change-Id: I1058d5b1f978aa040f8b2f018c4357dd7a3ef333 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 79e885537f8546a18d7d9d902d6efe40b1915c96) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist: test cases blacklisted in qquicklayouts:CI Insignificant Platforms Monitor Bot2022-03-011-0/+9
| | | | | | | | | | | | - tst_stacklayout::compile on qnx - tst_gridlayout::compile on qnx - tst_rowlayout::compile on qnx Task-number: QTBUG-101327 Change-Id: I06593184389f11a4dec1fdfc71a2986db046b364 Reviewed-by: CI Insignificant Platforms Monitor Bot <ci_insignificant_platforms_monitor_bot@qt.io> (cherry picked from commit 126afed75f738d93935b3b82f1afddda058ec148) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Blacklist: test cases blacklisted in tst_QQuickFileDialogImpl:CI Insignificant Platforms Monitor Bot2022-02-281-0/+3
| | | | | | | | - goUp on qnx Task-number: QTBUG-101329 Change-Id: I5c1a3c98caf5299f53db4b4fb430d4cc29f5bb4a Reviewed-by: CI Insignificant Platforms Monitor Bot <ci_insignificant_platforms_monitor_bot@qt.io>
* Remove PUBLIC which leads to unnecessary Qt::Gui dependenciesTatiana Borisova2022-02-281-1/+1
| | | | | | | | | | | | - Some qtdeclarative tests don't need GUI library, but QT_GUI_LIB definition is generated for static build qt/qtdeclarative/tests/auto/qml/qjsprimitivevalue/CMakeLists.txt example. The thing is linking of PUBLIC_LIBRARIES Qt::Qml brought plugin linking and generation not full GUI dependencies. Task-number: QTBUG-99123 Change-Id: Iad923735ff4d487dabab927f8c49b0100bef2525 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit b56a8c98805f24a896fd563e4af76d1a0f03d9c9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Copy QML builtins in prefix buildsAndrei Golubev2022-02-281-0/+7
| | | | | | | | | | | | We need to do it "manually" since qt_copy_or_install only copies files in non-prefix builds Task-number: QTBUG-98011 Task-number: QTBUG-101163 Change-Id: Ie8e23fe15ad07054a15cc8f403079373382a5b83 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit c57ee418bf71120a2936bd8dd21ca5a9feb686d8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQmlMetaType: Don't duplicate notify signals for extended typesUlf Hermann2022-02-244-17/+43
| | | | | | | | | | | | | We have to add the methods first, so that the properties can be associated with their proper notification signals once we add them. If we add the properties first, the "missing" notification signals are synthesized. Fixes: QTBUG-101155 Change-Id: I1aacbf33a24f7a98d05dece77c804bd7cba8a041 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 57614680f760068c1db39888beba46944f409ff0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qmllint: Properly warn about calling propertiesMaximilian Goldstein2022-02-239-4/+117
| | | | | | | | | | | | | | | | | | Previously whenever a property was called the warnings qmllint emitted made it seem like the property was just not found instead of not being callable. Now we will warn if you try to call a property and warn about properties shadowing methods, slots or signals. We also discourage calling variant properties now that may or may not be a function. This change also fixes an assert being hit in isMissingPropertyType due to our previous, lackluster checks. Fixes: QTBUG-101074 Change-Id: I0790b4a4584f3430ee1d8ddf549611225a36cc5b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 1829d7c64c1d8d5b42241135bfead030521cb398)
* Update dependencies on '6.3' in qt/qtdeclarativeQt Submodule Update Bot2022-02-231-5/+5
| | | | | Change-Id: I64c9ce145ce62f756ebe6fb755c2e8ee08b1cf8c Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Fix tracking of sg initialized state in rendercontrolLaszlo Agocs2022-02-221-0/+1
| | | | | | | | | | | | | | | The initialized = true statement either went missing or it never was there. This has zero effect on the common usage where the client does not bother with invalidate(), but rather destroys the QQuickRenderControl. However, more complex usages, such as in QQuickWidget do need to invalidate for various reasons, without destroying the entire QQuickRenderControl. Change-Id: Iaabc6309cb42cfdd624321863a5504cdeb01275d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 167b22c7010363275f2895ff4965529b35c36eac) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qmlmodels: Move QModelIndex from QtQmlMaximilian Goldstein2022-02-2210-20/+15
| | | | | | | | | | | | Moves the QModelIndex value types from QtQml to QtQml.Models as they cannot otherwise be properly resolved in tooling. Fixes: QTBUG-100338 Change-Id: I30fc18b388974238ba8353e87ef09f57f8ceabd1 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit e2864d6aa97d246546514ec0f97263574d19ec47) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmltc: Handle (simple) deferred properties correctlyAndrei Golubev2022-02-2213-1/+389
| | | | | | | | | | | | | | | | Simple deferred properties occur quite often in QML (throughout Qt Quick, for example), so qmltc should be able to deal with them as with deferred properties Ignore generalized group properties, PropertyChanges and similar types for now. They require more testing and are well out of scope of the tech preview Task-number: QTBUG-100053 Change-Id: I0f3588789d188cd6bec81de0b61d3205b665a917 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 68924be5b5282fb9f0276c743cf450f2e2aa5274) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmltc: Fix attached property code generationAndrei Golubev2022-02-221-1/+4
| | | | | | | | | | | | | | | | | Attached property code generation is borked so fix accordingly: the compiler used an attached type where an attaching type should've been used. Given the obvious naming ambiguity, this was likely a typo of sorts Partial cherry-pick of a099030009eb8a9262b5e9e7565fe48bc866309b as the unskipped tests still would not work. They need 687609f2f3a98ade4b8e074615c3d1db1228fce0 in 6.3 (and maybe more) Change-Id: I1e4fd4d916ad3bd1bacf2aee1ce2346f9283c70d Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit a099030009eb8a9262b5e9e7565fe48bc866309b) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: link to Qt Quick Controls' Dialog type from Qt Quick Dialogs'Mitch Curtis2022-02-221-0/+1
| | | | | | | | | | | | | Unfortunately when searching online for "dialog qml", the only doc.qt.io links are for Qt Quick Dialogs and Qt Labs Platform, which makes it difficult to find the Dialog from Qt Quick Controls. Link to it from the detailed description to make it clearer. Change-Id: I8874b9111be5938b4e77e4dbd397f5eace2e5242 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit 85c38d78d863e0201dd1d66093468ebca2c5bedc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: disambiguate section titlesMitch Curtis2022-02-221-8/+8
| | | | | | | | | These were accidentally catching other links. Change-Id: Ifc2d9eeef8d4629e25c217fc39d9f01ef134538c Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> (cherry picked from commit 801fcbcfa382d25137080056512957f7fd26c967) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qmllint: Warn about missing property types on current scopeMaximilian Goldstein2022-02-214-16/+39
| | | | | | | | | | | | | | | | Previously we only warned about missing property types when the lookup was not on the current scope but only on an id, parent etc. This change makes sure we also warn in this case and don't produce false positives for an unqualified access. Task-number: QTBUG-100839 Change-Id: I732b8420c0c6b96dd8f93cde66a7f9813e704671 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io> (cherry picked from commit 696f89b1988ed54833406ee8166ffa40e3edaee5) Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>