aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update dependencies on '6.2' in qt/qtdeclarativev6.2.0-beta4Qt Submodule Update Bot2021-09-021-4/+4
| | | | | Change-Id: Ia72672287af19ddf06448966d150b23fc81e96cc Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Rename shapes example qml files according to what they demonstrateShawn Rutledge2021-09-0119-48/+48
| | | | | | | | | | | | | The order they are shown in the grid is not important; but users should be able to run any of these qml files directly without building the example, and appropriate names make the "right one" easier to find. Task-number: QTBUG-95739 Change-Id: I9751b52ce80bc08e12919ca3396c9d428d700a04 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 270a6f9bba75478204dc6aadb348cf34a195a4da) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Disable quick examples currently breaking top level buildsCraig Scott2021-09-021-3/+3
| | | | | | | | | | | | The add_subdirectory("../shared" "shared") pattern used by these examples seems to somehow trigger an AUTOMOC-related generation error. The cause is not currently known, so this change temporarily disables those tests until a proper fix can be found. Task-number: QTBUG-96159 Pick-to: dev Change-Id: I2525b77d0a25c3e3191ae2956857acabc0aedbf5 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove unnecessary repeat of applying Android arch suffixCraig Scott2021-09-011-4/+0
| | | | | | | | | | | | | | The call to qt6_add_library() already calls qt6_android_apply_arch_suffix() before it returns, so we don't need to also call it in again in qt6_add_qml_module(). Change-Id: If2ac1a642171baeb0cd8c8c2e97961268be26b3a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 6d97268b4c88d09184f796294966bd967f8fef98) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Ensure versionless wrappers do not introduce a new variable scopeCraig Scott2021-09-011-8/+8
| | | | | | | | | | | | Using function instead of macro prevented the wrappers from being able to pass back any variables set by the wrapped function in the calling scope. Prefer macros to avoid silently swallowing such variable setting. Task-number: QTBUG-96121 Change-Id: Ia0695fbf65375cc9541612736e34e873c0230832 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit fdc1e18f8b829efd1f57dc8514d2b0a0ccb7f447) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.2' in qt/qtdeclarativeQt Submodule Update Bot2021-09-011-4/+4
| | | | | Change-Id: I5c25ce8a604041d9e7f13d13aa318707f6a677e8 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Clean up shapes exampleUlf Hermann2021-09-0126-182/+61
| | | | | | | | | | | | | Drop the confusing alias mangling on all the QML files. Instead move them into the base "shapes" directory. Also, use a QML module in CMake and use the "shared" module as intended. Change-Id: I6a8fc3f2b2f86f58a54e188cf83ec7e2d4e8f468 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 66c011c5582de0565d85a77b282118a84aba51ad) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix dialcontrol example to use a QML moduleUlf Hermann2021-09-0111-32/+26
| | | | | | | | | | | | Also move the QML files out of the "content" subdirectory in order to avoid the directory import. Change-Id: I84a1f5ef1a45e5098ec3213c6fbce06346f3606a Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 2dfb912058ecb865f2ed5becad04756b51bfbc7b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Declare QQuickImplicitSizeItem as QML_ANONYMOUSUlf Hermann2021-09-011-0/+2
| | | | | | | | | | | Holes in the QML type hierarchy lead to interesting effects. We don't need to give ourselves and our users those headaches. Change-Id: Ie1cf94001fda0e1552a2cf260ccc327c30bf7b31 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 31a36fc39245b460489d03bac3d89d240a1e6575) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix coding styleOliver Eftevaag2021-09-011-5/+5
| | | | | | | Change-Id: Icfcdcb306dbeb750c8ebad44b431c5364ef63c44 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 621e583f0587d3ed7d729958b2ab9bf3973af4e0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.2' in qt/qtdeclarativeQt Submodule Update Bot2021-09-011-4/+4
| | | | | Change-Id: I6d638a84504771dee19ae318d5a7c9c2fc3b2ced Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Convert dynamicview tutorial to use QML modulesUlf Hermann2021-08-3114-8/+203
| | | | | | | Change-Id: I98069eea1bd4492aba661e4672ffe297f0dcc4c8 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit c10427bc040c6a8dd9d56f0c56175935d1230486) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix shadereffects example to use a QML moduleUlf Hermann2021-08-311-17/+13
| | | | | | | | | Change-Id: I3787fdfebfa1e376c2891f16f3fcf4f29f0e26d4 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> (cherry picked from commit 255d8a84b35d296febc5c81b193c8ab2984ae1a1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix top-level developer buildJoerg Bornemann2021-08-311-1/+1
| | | | | | | | | | | | | | | | Commit 4c305d7d2807b3bba9c3935cfe28b88e491f6032 broke the top-level developer build by including a doc snippet that relies on the existence of the moc binary. Don't include the snippet in the top-level build when moc cannot have been built yet. Fixes: QTBUG-96118 Change-Id: I79cbd95f224e8af104eebc7a7fbe5de5e4dff2ec Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 609cfe35880cd85f35c20afcf3f0f11d15712b2c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Don't crash if item is deleted from mouse clickPaul Olav Tvete2021-08-311-1/+2
| | | | | | | | | | | This caused a crash in QWaylandCompositor when closing the final window in an action triggered by a mouse click. Fixes: QTBUG-96126 Change-Id: I48ead0e8e2eb2e24c168c6b3bb9ba39b4db42893 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 3a4b04c7cac426c5dd0e4ba53129863d16e89c89) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.2' in qt/qtdeclarativeQt Submodule Update Bot2021-08-311-4/+4
| | | | | Change-Id: Ief43227be3480f5f7050379f1d9280f82733825b Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Test Windows style in tests/auto/quickcontrols2/controlsMitch Curtis2021-08-315-0/+165
| | | | | | | | | | The goal is to fix the failing tests (which are blacklisted here) in upcoming patches. Task-number: QTBUG-95679 Change-Id: Ia34ab03732fc130ea95e88c6196efcff7fc8b46e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 3e812a04ada440707954ab327157915b7911bb8f)
* Fix samegame example to use QML modulesUlf Hermann2021-08-3148-77/+287
| | | | | | | | | | | | | | | | | | | | | | In this case it really makes no sense to use a shared directory because we want to show the progressive changes between the different versions. It's actually important to note that we're adding the pictures one by one. Therefore, the shared directory is dissolved and the pictures added duplicated into the respective versions of samegame. Furthermore, moving the code into a "content" directory is a bad idea because it complicates the import logic. We don't want to make the "content" directory its own QML module. We might move samegame.qml into the "content" directory, too, and apply some path wrangling to make it work, but it's really not worth it here. Change-Id: Ifc45f48832596377c21bc6ef55e918ef487bc94e Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit a3ea7a99381748c457336bfa8b9373070ebfa3ee) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove QQuickDesignerWindowManagerLaszlo Agocs2021-08-315-251/+0
| | | | | | | | | | | | | | Already unused when building qmlpuppet with Qt 6. 90027cd298359a70f35b6feca98609a3c7fc67e3 cleans up the last not-ifdefed reference in Qt 6 builds, so now QQuickDesignerWindowManager can just disappear. Change-Id: Ia8d1dbf923e989534d9747d5396cc6b032be73f9 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 8d24373a79020105908f0077e25e6cb2e7a8c78e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* DynamicView4 tutorial: add forgotten file to qrcOliver Eftevaag2021-08-311-0/+1
| | | | | | | | | | | | The FileSelector.qml component for some reason were never added to the qrc file, which meant that it didn't exist in the eyes of qmake. It should now be possible to run the program. Change-Id: Iaab67860123e926456c99b775449648f5d8e7c3c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 71a781beb172c0c1e2653684e76cc51114b086f9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove .prev_CMakeLists.txtUlf Hermann2021-08-319-403/+0
| | | | | | | | | We don't need to use pro2cmake anymore here. Change-Id: Iba8bac70c1fe31e56bf9680608913cc2c336f946 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 405bbc1c0e12e888807ff458c6df600968420e83) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Fix remaining documentation warningsTopi Reinio2021-08-315-6/+8
| | | | | | | | | | | | * Refer to correct types in Window QML type docs. * Fix link target for 'Required properties'. * Fix other minor issues. Task-number: QTBUG-95860 Change-Id: Icc2819a18ad8cfc44d39f13b22c595ed7b2f0806 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 13c5c8e09e2a91f3675ef2da93d25912e1f01b13) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: qmake: Fix chapter6-plugins example to build in more configsAlexandru Croitor2021-08-313-30/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, I tested the following configurations / scenarios (1) shared Qt + qmake + macOS bundle -> works (2) shared Qt + CMake + macOS bundle -> broken (3) static Qt + qmake + macOS bundle -> broken (4) static Qt + CMake + macOS bundle -> works (2) was broken because the shared qml plugin is not located in the expected location (see below) (3) was broken because qmake needs a lot of error-prone boilerplate to ensure static qml plugin building and linking works. The change fixes the example to build and run successfully in case (2). Tested the following scenarios on macOS with the change shared Qt + qmake + macOS bundle -> works shared Qt + CMake + macOS bundle -> works shared Qt + qmake + no bundle -> works shared Qt + CMake + no bundle -> works static Qt + qmake -> still broken static Qt + CMake -> works To make shared qml plugins be found in a macOS bundle, we need to copy the qmldir and plugin under the bundle's PlugIns subfolder, because the application adds that as the expected qml import path for macOS. This basically mimics what the qmake project does with QMAKE_BUNDLE_DATA. The change also cleans up the CMake projects a bit so they don't link PUBLIC-ly against dependencies, install the plugin under a more sensible location and don't needlessly setup package finding and other boilerplate that's done in the parent project. The change also cleans up the qmake projects to adjust to not pollute the macos bundle dir with static plugin files. Amends 9e1d2a0eb15487f8f2acb4d91b281568897fb4e1 Change-Id: I45bb699a67adf598587350a03f778291fad3f850 Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 9cbf4d2cc85723dadadadb5fe1ade9719dfeb2a6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Catch using the same output directory for different QML modulesCraig Scott2021-08-311-0/+18
| | | | | | | | | Fixes: QTBUG-95207 Change-Id: I1d967e15652b004c792737f92490544f4fabb908 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 2a374f15a8b40da008b3fa6d868359e49c2bae06) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update views example to use modulesUlf Hermann2021-08-306-89/+66
| | | | | | | | | | | The qmake and qmlproject files are adapted to use the "shared" module, too. Change-Id: I5fc4895416357ba202528b155581b1b5a880a68d Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit cb9cc7ca66ab7f901b4032ed3e8f5cea3ba9e469) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix touchinteraction example to use QML modulesUlf Hermann2021-08-3024-85/+55
| | | | | | | | | | Remove the "content" subdirectories. They just add noise. Change-Id: Iae6bf7d91b6804294673be8966e30b11caae0654 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 76a413bb11dd444239d3e0ae5fc86a3021d53409) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix the qtquick/window example to use QML modulesUlf Hermann2021-08-307-52/+143
| | | | | | | | | | | | | The shared code becomes its own module. Due to the ${PROJECT_NAME} trick it should be possible to include it multiple times, in different examples. Change-Id: I78cc3211f67fae9a713320fae4041898e6a397ed Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io> (cherry picked from commit 7b6eea37aeea55cdf1bcb1fd9c3091d6753f95e8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Remove \versionlessNote qdoc macroJoerg Bornemann2021-08-305-6/+4
| | | | | | | | | | | This macro has been moved to qtbase and renamed to \versionlessCMakeCommandsNote. Task-number: QTBUG-95796 Change-Id: I941ba1a7db7180802c24d4d2417141668f0d3805 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 7fc93a861ff768237dec50cee2c0bba555cea7a7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add documentation for qt_target_qml_sources()Craig Scott2021-08-308-77/+223
| | | | | | | Change-Id: I4e868bb522202f23e99abbb808b976c1d58ebf8c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 4c305d7d2807b3bba9c3935cfe28b88e491f6032) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Rename source property to QT_QML_SOURCE_VERSIONSCraig Scott2021-08-307-60/+78
| | | | | | | | | | | | The old name was the singular form, but the property accepts a list of versions, so plural form is more appropriate. Still support the old singular name with an author warning, since it was part of tech preview and some code might be using it. Change-Id: I2dbd9b1809bae6f608b222577b2f37a7dc94805d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit d8bc85e79a7b9ea40cc96a53fb6a312dd4b06cb0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove statement that ${target}_qmllint isn't part of the ALL targetCraig Scott2021-08-301-4/+3
| | | | | | | | | | | | | | | A workaround was added for Xcode generators which made a target depend on its ${target}_qmllint target. This has the side-effect of making the ${target}_qmllint become part of the ALL target. Remove the statement in the docs that contradicts that behavior. Amends 1bd0a5ce02352a600367beb5a5421c8f8332e1fe Change-Id: Ia09080dfa8cda372c806ee6623a596f86d3526e8 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit f554a5b6b87ab4a93893a1827a07746f85504f0c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update the accessibility example to use QML modulesUlf Hermann2021-08-306-19/+12
| | | | | | | | Change-Id: Iec3dad42dd08ac230ffde15b422ae7f68d419e81 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> (cherry picked from commit 9cb0b528e34271ca5bfe4dea214e83bcb4c91da1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Protect unregisterInternalCompositeType() against null metatype dataUlf Hermann2021-08-301-5/+7
| | | | | | | | | | | | This may be called on shutdown when the data is already gone. Fixes: QDS-4390 Change-Id: I89de5fc1e66fca4318939179ed356620110b08e9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> (cherry picked from commit 98af4ab983b9b33c6f5cdb71f6f4f4dd7419aa30) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Allow qt6_target_qml_sources() to be called with just resourcesCraig Scott2021-08-301-2/+2
| | | | | | | | | | | | | | | | | | | The argument checking was doing an early return if no QML_FILES were given, but there are use cases where one might want to pass RESOURCES and no QML_FILES. Change the early return logic to only return early if there are no .qml files and no resources. Now that we might have no .qml files, bypass preparing for qmlcachegen if no QML_FILES were given. This avoids a potential error if an invalid qmlcachegen property value would be encountered but it wouldn't have been needed to begin with. Change-Id: Id197a541d4a5d1317ed14e56f0ac4d0d774b3568 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> (cherry picked from commit d5611b288169961254a3a15b7a2416964e1b8781) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Shapes example: use qqc2 componentsOliver Eftevaag2021-08-2825-122/+134
| | | | | | | | | | Changing the example to use qt quick controls where it makes sense Task-number: QTBUG-95739 Change-Id: Id0df227657693234de4481c2316dc6c3e0545043 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 5ae40afa970731ce976323f1a912b46bdff325d0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* ShaderEffects example: replace custom slider with qqc2Oliver Eftevaag2021-08-284-108/+12
| | | | | | | | | | Replacing a custom made slider component with a qqc2 slider. Task-number: QTBUG-95738 Change-Id: I407307a3769a0c9821d311189ed40b0d48dab4d3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 9e38f4da96ce294194c497e76b001298fe557f2d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use <major>.0 as default version for QML filesUlf Hermann2021-08-2714-630/+30
| | | | | | | | | | | | | | | | | | | | | | | | Using the full module versions presents problems if you bump the minor version of your module. Bumping the minor version then bumps the versions of all QML files not explicitly versioned. This is certainly not what you want as the files should still be available to imports of the old version. Having it default to minor version 0 is more practical because many QML files are available from version 0 of their respective modules. Now you need to add version entries for files you add after .0 in order for them not to show up in imports of earlier versions. This is less of a problem, though, even if you forget it. In addition, use PAST_MAJOR_VERSIONS to derive additional versions to be added to the QML files. This allows us to drop a lot of boiler plate code from our own modules. Change-Id: I8e4cfc16180af30e8bafc0a62137e9018f7eaee8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit de27215766f13cb5c870e6a1285836164d6e574c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* DefaultGroupBox: don't assign bindings to the delegate's width and heightRichard Moe Gustavsen2021-08-271-4/+0
| | | | | | | | | | | | | | We should never assign anything to a delegate's width and height from the style. Those assignments will anyway be overwritten by QQuickControl upon a relayout. Instead, we should normally use implicitWidth and implicitHeight. But, special for a QQuickStyleItem, implicit size is already set from c++, based on qstyle. So remove the assignments from QML. Change-Id: Ied941e0b40e83e0a2771bb1cd7cb517cba8684d1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit aaa0ef458ae09d48dd2eccb55fdcfeebfcbb1e3b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Migrate to fixed add_shaders prefix handlingLaszlo Agocs2021-08-275-5/+7
| | | | | | Change-Id: I6c5b0680d32bc3650983c64cc4583f790774da88 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Update dependencies on '6.2' in qt/qtdeclarativeQt Submodule Update Bot2021-08-271-4/+4
| | | | | Change-Id: I2ece4fd84f03ebc9ea2079aa8e3e8db6aed6079b Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* CMake: Set up extra dependencies for qml static pluginsAlexandru Croitor2021-08-272-0/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a project wants to avoid usage of qt_import_qml_plugins and instead wants to link to the qtquick2plugin plugin target directly, it would also have to explicitly link against the other plugin targets that are its dependencies, which are qmlplugin, modelsplugin and workerscriptsplugin. This is needed to ensure the _init object libraries are linked to as well. Linking only to the static backing libraries is not sufficient, because those don't have the _init libraries as dependencies, only the plugins do. Each qml plugin target should automatically bring its plugin link dependencies via usage requirements. To achieve that, when a static qml plugin is created, we now collect all the private dependencies of the plugin backing lib or the plugin itself (if it has no backing lib), check if each dependency is a qml module, extract the module's associated plugin if it has one and list it as a dependency of the new qml plugin. Now a project can add a target_link_libraries(target PRIVATE Qt6::qtquick2plugin) and that will implicitly call target_link_libraries(app PRIVATE Qt6::workerscriptplugin) target_link_libraries(app PRIVATE Qt6::modelsplugin) target_link_libraries(app PRIVATE Qt6::qmlplugin) Note that the workerscript plugin is added manually as a conditional dependency for the qml plugin if the workerscript feature is enabled. To ensure that almost all dependencies are collected, we defer the call when using CMake 3.19. One implementation wart is that we need to ensure these new dependencies don't get written to the plugin prl files, because qmake has its own mechanism for generating Q_IMPORT_PLUGIN files. To do that, we wrap the dependencies in a special genex that tells the build system not to add them to the prl files. Task-number: QTBUG-95609 Change-Id: Ia10109bb2286bd08b788ed3e54803ccfee18f369 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 6fd1216801f078f65be2cbc748cc459cb6912a4f)
* QQuickSelectionRectangle: show a SizeFDiagCursor on top of the handlesRichard Moe Gustavsen2021-08-261-0/+10
| | | | | | | | | When hovering a selection handle, show a diagonal resize cursor. Change-Id: I70b20a075434fb8869bc5bd813bfea7e8ec7e67c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit fbb27294e3c6482fc94c2ecc858fc429ec1bef4e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* SelectionRectangle: use transparent handles for the desktop stylesRichard Moe Gustavsen2021-08-263-96/+31
| | | | | | | | | | | | | Showing selection handles for the desktop styles really doesn't look correct. So rather than adding something that looks a bit out of place, just use invisible handles instead. This allows the user to still drag on the corners of the selection. Change-Id: Ic13da3eeb24b293f1c7f87d78fe12e997651e579 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 0d3f0b581c2272c70c14b1811a3d65a52276988c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove deprecation warning from QtQuickControls2 gallery exampleLuca Di Sera2021-08-261-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the "Delegates" page of the gallery example the user is allowed to swipe over the available `SwipeDelegateComponent`s to show a 'remove' button, which allows the removal of that item from the containing list when pressed. When this happens, an animation is played. In the code, the animation was attached to the signal handler, as follows: ``` ListView.onRemove: SequentialAnimation { ... } ``` This form of attachment has been deprecated as of Qt 6.1.0, in commit 6eb35df60e, in favor of creating a stand-alone object and calling the relevant slot from the signal handler, generating a series of warning when the attachment happens during the creation of the page. This patch updates the connection to the new format, avoiding the generation of the warnings. Fixes: QTBUG-95562 Change-Id: Ib67cb9b8703dad427c49475c00791fdd5d1b0669 Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 6901fb779a750949e0c436ff2fbfc15d0aae6319) Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* doc: move the SelectionRectangle snippet to correct the placeRichard Moe Gustavsen2021-08-262-7/+7
| | | | | | | | | | | | | After the cmake changes that restructured the repository, the snippets are now located in a different place. Update the documentation for SelectionRectangle to reflect this, and correct some related documentation issues at the same time. Change-Id: I4860973bf101dc6c2dce5f64822235f0b5b73ce6 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> (cherry picked from commit de66c7e6c4ae03d1da2225dc443a028bf5f6e722) Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickTableView: issue warning if no selection model is availableRichard Moe Gustavsen2021-08-262-2/+12
| | | | | | | | | | | Print a meaningful warning if the application creates a SelectionRectangle, but forgets to assign a SelectionModel to TableView. Change-Id: Icdc438f616a58827425cf842c32ba588c406503b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 63af8aa8ad1f078b70cc947974f1ec0c42e628f4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qqmllistmodel: Fix QObjects setting indestructibleCathy Park2021-08-264-1/+55
| | | | | | | | | | | | | | It makes a QObject indestructable only if its ownership is determined. This fixes an issue where a QObject created by createObject() in QML becomes indestructable once it is appended to a ListModel. Fixes: QTBUG-95895 Change-Id: I30647298977d7901dab938626e8f94b9910c21e3 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Jaeyoon Jung <jaeyoon.jung@lge.com> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> (cherry picked from commit 69e07c55ad9b49b7643ffddfedc9a558983272ad) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Make tableview manual tests directly openable in CreatorMitch Curtis2021-08-265-0/+30
| | | | | | | | | | | This avoids the need to run qt-cmake-standalone-test and then import the test, as described in QTCREATORBUG-25389. Task-number: QTBUG-93020 Change-Id: I7e0685aff91e82fc834b91b08878d48ba21fba9b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit d55fa705f068715b5ef93620dffcf94b310541d1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix build without accessibilityMitch Curtis2021-08-264-2/+18
| | | | | | | | | Amends 4b1acb290dc8869d0d2d1250dc1ed415d6b6e202 and friends. Change-Id: Ida44dd5e1865673878601da97685fd1aa19c40c3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 2ffd1ffb0e0ee6028849a279d36fe3f68fed1e99) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Canvas: Add a means to override the DPR used via an environment variableAndy Shaw2021-08-251-2/+9
| | | | | | | | | | | | | | | | | | | Overriding the DPR enables the system to not use as much memory and resources that a low-end device or mobile might have a limited amount of for rendering the Canvas item. In a situation where the user is aware of the consequences and impact of forcing the DPR to be different to the canvas window's DPR then this can be useful in those situations. By having the environment variable to override the DPR then it makes it possible for those needing this right away in all versions of Qt, so we add this now with a view to add API for this at a later date. Change-Id: Icafaa04a15678e2c7f24bc791026676f476a6ced Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit b0193908258f315a5736edcbc2a034d3194d42c9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>