aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Fix incorrect \quotefromfile pathsTopi Reinio2021-09-131-2/+2
| | | | | | | | | | These files were renamed or moved around. Task-number: QTBUG-96125 Change-Id: I7ceefdec83f38477e48cf762bce34235d3f84b6d Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 42c13ae5ff93ce4c7c49ce32425b53d6a463a6d8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* correctly export qQmlResolveImportPaths()Fawzi Mohamed2021-09-101-1/+3
| | | | | | | Change-Id: I5d7aa6ed56d95020a831ca466c9c021dc86c775e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit d2aaca797d3651a2c286f000794ca05f6cd9184c) Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
* Fix warnings/errors from changes to paths in chapter6-plugins exampleCraig Scott2021-09-101-6/+4
| | | | | | | | | Amends 2d2750efc3b5a97a5f1cf09b4265a26fcc393499 Change-Id: Iab27efb7359cfcea9274dcbbc7ac64b647d3e71b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 784af37650a77b30de01776262c1fe6727075615) Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Document chnaged behavior of url propertiesUlf Hermann2021-09-101-25/+5
| | | | | | | | Task-number: QTBUG-95587 Change-Id: I5f465bd37673d3a2e592def50550aacef9e060cd Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit bd1a62be001523602abaebfd6afb45ae15cfa871) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix generation of names in qmldir filesUlf Hermann2021-09-091-2/+12
| | | | | | | | | | | | | | | | | Dots in QML module names are useless because you cannot instantiate a component with a dot in its name. We might as well strip all the extensions when adding components to a qmldir file. This takes care of .ui.qml as well. Furthermore, JavaScript files must not be listed because they cannot be instantiated as QML components. Change-Id: I9782420ea79fef1d5eedef97cf7a748b96ddbe2b Fixes: QTBUG-96301 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Tapani Mattila <tapani.mattila@qt.io> (cherry picked from commit 14a3b34906be5b749ebc6b6c1d8f6807fff8fd88) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Use modified target name as base name for internal qml pluginsAlexandru Croitor2021-09-081-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using only the last dot component of the URI as the plugin base name causes issues when an app that uses QtQuickControls2 is macdeployqt'ed. The qqc2 impl plugins all have "impl" as the last URI component and thus they all use "impl" as the base name. macdeployqt tries to copy all of the plugins into a flattened PlugIns/quick folder, which ends up copying only one of the files. User qml plugins use the plugin target name as the plugin base name and plugin file name on-disk. There shouldn't be a reason for internal qml plugins to deviate too much from that. Adjust the internal qml plugin name to use the plugin target name with "plugin" suffixed at the end, but make sure to remove any existing "plugin" from the target name if it already exists, so we don't end up with double "plugin" in the base name. Amends a25f650c317e4886007a8beb0e9f2f7e973e6e7c Task-number: QTBUG-95140 Task-number: QTBUG-96261 Change-Id: If6096e88bf2da3de081d68fad2e70cef5a0b18af Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 658a911f9c8789418710bcbd9513774de89cb082) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add button argument to the TapHandler.[single|double|]tapped signalsShawn Rutledge2021-09-083-16/+24
| | | | | | | | | | | | | | | | | | | | | | | | | It would be better to emit the whole pointer event (by pointer because it's non-copyable, or make it copyable and emit by value), but we can't. So we just add the button being tapped; more information is available from the eventpoint argument and TapHandler's point property. To avoid name clashes with anything that's already called "button" in anyone's QML (which is quite likely, actually), the new signal argument is unnamed, so that users will be required to write a function signature that gives it a name rather than relying on context injection. [ChangeLog][QtQuick][Event Handlers] TapHandler's tapped(), singleTapped() and doubleTapped() signals now have two arguments: the QEventPoint instance, and the button being tapped. If you need it, you should write an explicit function for the signal handler: onTapped: function(point, button) { ... } or onDoubleTapped: (point, button)=> ... Fixes: QTBUG-91350 Task-number: QTBUG-64847 Change-Id: I6d25300cbfceb56f27452eac4b29b66bd1b2a41a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 5864644ac8bc3c561696ffef5d033b1cab7d950f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add all qml debug translation fixes and functionalities from 5.15Tuomo Pelkonen2021-09-086-25/+68
| | | | | | | | | | | | | | | * Add current state name in the protocol * Get style name in correct format * Get correct root item after changing new file Task-number: QTBUG-96052 Change-Id: I5a7b9e29ec83e6258505cedbd55edf376386f783 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> (cherry picked from commit 1a85f784132f83211de431193d72cdf1e850f778) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit c02f52fc452c1488c56453f1e9709968be33948f) Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Fix implicit size of TextAreaJan Arve Sæther2021-09-071-5/+4
| | | | | | | | | | | | | | An empty TextArea had a too large size because its placeholder item was too big. This follows a similar pattern as the former fix for TextField (5d8e74ab89b5ae465aefab924f4f14db59328a50) TextArea::test_ImplicitSize demonstrated this bug Task-number: QTBUG-95679 Change-Id: I2b71208a02e47a0a072326a6d600cbac90862ea7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit abf96ed452578d619a89982fc5fe233239768a71) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickGrid: Warn if there are more items than rows*columnsAlbert Astals Cid2021-09-071-1/+5
| | | | | | | Change-Id: I701d86079f2ddfb73b0470de97a2d1bff648166c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit a4a80db180540917e3077a2e22c71548f14fd8b6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* doc: Improve QML WheelEvent docsShawn Rutledge2021-09-071-18/+32
| | | | | | | | | | The phrase "wheel degrees" was especially inaccurate; everything else here is a drive-by. Change-Id: Idb1a23cc7c1849df18c3c1f401c66a0fbfbdb929 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> (cherry picked from commit e27bc63960ba8f81c6acd4c2375664a8012e58b2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix memory leak in Qt Quick Controls iconEirik Aavitsland2021-09-072-0/+8
| | | | | | | | | | | | The implementation of the icon property uses the internal QThemeIconInfo struct from qtbase. That is low level and expects the user to handle memory deallocation, and this was missing. Fixes: QTBUG-93050 Change-Id: Ied6488aa8871c246d3781a3db47f40130dc19bcc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 47ded88e0c2f489e112b72f62151123db5c04dbe) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qmldom: DomItem::makeCopy also for elements of the universeFawzi Mohamed2021-09-072-32/+45
| | | | | | | | | | | The universe is the cache where loaded files are stored, so to compare them immediately after load it is useful that the makeCopy method which creates a deep copy, works also on files in the files without environment. Change-Id: I35fc5a769b422d367d07af3374566997dd6b0153 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 42aa1d510214bb51f35c9ab0c798e39558d341cb)
* qmldom: improve path and addError performanceFawzi Mohamed2021-09-075-27/+90
| | | | | | | | | | | * avoid copy in Path::component(i) * find duplicate errors via map insert (log() comparisons vs n) Change-Id: Ib664615187fada810427665d161a0c3cabace1cf Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> (cherry picked from commit 3b19b9a9e67cae723496fadf97f91661596d6d33)
* Avoid to build the debug executable of qmlcachegen in multi-config buildLi Xinwei2021-09-071-2/+10
| | | | | | | | | | | Use $<COMMAND_CONFIG:${qmlcachegen}> to force the qmlcachegen command to rely on the release executable in multi-config build. Fixes: QTBUG-88414 Change-Id: I100f832fc70b63a235d2638dde04583c60fd8250 Reviewed-by: Craig Scott <craig.scott@qt.io> (cherry picked from commit 97b1062674283afb0131e73d8319c95aa7087a8b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Allow type conversions in storeNameSloppy()Ulf Hermann2021-09-071-2/+13
| | | | | | | | | | | That's part of the sloppiness. We have no way of retrieving the lookup metatype here. Task-number: QTBUG-96144 Change-Id: Ibd1c0d8e9bb66bfe66e59fd1368f3f8ac663d01c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit fb37577559fe524f010625302cf236609918d445) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Check setter == setLookup when retrieving lookup metatypeUlf Hermann2021-09-071-1/+2
| | | | | | | | | | | We want the same init/apply mechanics to also work with setObjectLookup, and for that we need lookupResultMetaType to do the same thing there. Task-number: QTBUG-96144 Change-Id: I410101b7f13e60c0c2ed156a8cf5813c490d7bf0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit eff007aef95bfb71618ad3a7bd00481e5197c0f3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix top level builds failing with AUTOMOC-related missing moc exeCraig Scott2021-09-071-0/+1
| | | | | | | | | | | | | | | | | | | | | In top level builds, qt_autogen_tools() needs to be called on any target that enables AUTOMOC. A previous commit fixed that problem for the qt_target_qml_sources_example target, but missed also fixing it for the associated plugin target. Add that missed call here. More examples that use the common "shared" quick directory have also since been added, but the step that ensures qt_autogen_tools() was missed. Add them to the missing step. One of the existing steps also had a typo, which meant it wasn't handled either, so correct that as well. Amends 067253fb2f1aec3e03c577dd53ed2e6d903c28da Task-number: QTBUG-96118 Task-number: QTBUG-96159 Pick-to: dev Change-Id: I2fae5d9a1fd474b22e01ec51d5b1030237f3e08f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* doc: Correct the type that WheelHandler's wheel signal emitsShawn Rutledge2021-09-061-1/+1
| | | | | | | | | | It's WheelEvent not PointerScrollEvent. Task-number: QTBUG-81302 Change-Id: Ie03fbf60492525301ee8d60a0c38c8a111251e0a Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit e2e7a1c5b81e4e7464134b4590aea799b0434d55) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Make TextField.implicitWidth fixedJan Arve Sæther2021-09-062-9/+14
| | | | | | | | | | | | | | | | | | | | | | | Previously, implicitWidth was based on contentSize() (which was based on the full textwidth inside the TextField) This had the unfortunate consequence that an empty TextField (which is very normal) was very narrow on startup (18 pixels on macOS style), but would grow wider as the user kept on typing. When the TextField was in a layout, this would in addition lead to a relayout, even though it usually was barely noticeable. This change aligns that behavior to the other non-native styles. This also fixes a test on native style windows: TextField::test_implicitWidth where it assumes that the implicitWidth of TextField without a background is simply equal to left+right padding. This failed because the calculation of the geometry of the placeholder item was wrong. Task-number: QTBUG-95679 Change-Id: Ie658411664d88df6cb6a337376bdcf897e8c1790 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> (cherry picked from commit e0990f8b4069ca912de5a27df00a8039aa4a4731) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use value type providers in metaTypeFromJSUlf Hermann2021-09-061-19/+9
| | | | | | | Task-number: QTBUG-96144 Change-Id: If12f669ae33bb8ae4768ca79e4ca985f70a2651d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 9d9df8073dcee685ce47074e93022e3e2b75b2b8)
* Fix broken doc link to Qt Quick DesignerCraig Scott2021-09-061-2/+2
| | | | | | | | | | No link is needed and other documentation doesn't link to anything for the same thing. Change-Id: I4d1dc910d8114bc99478c59882e8c1cf8327c415 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit aeb1d11f26c204e71e0c2f6c3c1b521bb59bba7d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add "As" function to symbol tableUlf Hermann2021-09-061-0/+1
| | | | | | | | Fixes: QTBUG-96099 Change-Id: I0bc50c0a66759c36dc50b2d6ef8e16be8fbba45c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 2426b622e1852a418e97a3be89ea1b3eb18b8fb9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qmldom: pass optional fileType to loadFileFawzi Mohamed2021-09-064-82/+102
| | | | | | | | | | | | | | If filetype is given use it to specify the type of the file to load (otherwise guess it from the file extension). Can be used to load qmltypes files as "plain" qml files (for reformatting). Ths enables the reformatting of .qmltypes (for API comparison) Change-Id: Ib65647c2a8dc8b37b7e955acb3aec2193d36666d Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 7331f651c1c16217a31f3cdec700f014057b7268) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add documentation for qt_import_qml_plugin()Craig Scott2021-09-064-68/+28
| | | | | | | | | Change-Id: I1f503cd03c35e48f2219e95db57b153c69badb0b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 9fdb12bdac0efd9875b2d98ae82c3702cf722469) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix OUTPUT_TARGETS not being set in parent scope in all casesCraig Scott2021-09-061-1/+9
| | | | | | | | | | | | | | | | Fix versionless wrapper functions that were previously not forwarding on any OUTPUT_TARGETS set by the versioned command they were wrapping. Also fix qt6_target_qml_sources() not explicitly setting the OUTPUT_TARGETS variable in the calling scope if no targets were added. Task-number: QTBUG-96219 Change-Id: I13c9e67125434267cb1e328fb735a0f8cde2792e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 9e62b6a355b415db9b99ddfb2459fc0914d63a93) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Revert "Ensure versionless wrappers do not introduce a new variable scope"Craig Scott2021-09-061-8/+8
| | | | | | | | | | | | | | This reverts commit fdc1e18f8b829efd1f57dc8514d2b0a0ccb7f447. Macros add another level of escaping that functions do not. The conversion of the versionless wrappers to macros may alter the behavior, so revert that change. Task-number: QTBUG-96219 Change-Id: Iab36fba8543b0ece7eb505046d886db7064972f0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 995a254f9727352f84889ceabead58a12f659455) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update the QRhiTexture size in QSGPlainTextureLaszlo Agocs2021-09-041-1/+6
| | | | | | | | | | | | An autotest is added separately for dev only because the necessary infrastructure for sophisticated scenegraph tests only exists there due to some earlier commits that are in dev and not in 6.2. Fixes: QTBUG-96190 Change-Id: Ie2adee96864b60f982a83b9b2785a93d5401bd6a Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 4de27382f9b5f05b8d5821247ea7653b44264c03) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* doc: Deprecate MouseEvent.source in QMLShawn Rutledge2021-09-041-0/+1
| | | | | | | | | QMouseEvent: :source() was deprecated already in 6.0. Change-Id: I666210bf5fc892349c13cc5bc15f3755948e6007 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit cefbdac27f1e0f855d2f4669f31475181604e363) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qmltyperegistrar: Properly resolve includes for foreign typesUlf Hermann2021-09-041-1/+1
| | | | | | | | | | When we add them to the qmltypes files, they need the same preprocessing as the own types. Change-Id: I3c8e946609b8a0a8f739812508b75e4f085feddc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 226b728d92975668d1ff864ab1f3f107477aef27) Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
* Doc: Clarify PAST_MAJOR_VERSIONS and "auto" versionUlf Hermann2021-09-031-8/+31
| | | | | | | Change-Id: I098b483bab5f635ee1f7f6b8b20b60d85a7165e1 Reviewed-by: Craig Scott <craig.scott@qt.io> (cherry picked from commit c1c6e15874c1468152140edc1c3cdc72ffa49e8c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Allow plugins to be optional if they have no backing targetUlf Hermann2021-09-032-7/+1
| | | | | | | | | | | | | As we encourage linking to plugins, this is a valid case these days. If the plugin was already linked, it shouldn't be dynamically loaded anymore. Conversely, a non-optional plugin should not be linked into anything, unless it's linked statically. Change-Id: Id5f0fa0ad745d458ce3235bcc2c0e569760e9db2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 483274ee3e259ddef19d0a00c004ec33c1a89276) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Make sure to install designer files with non-prefixed buildsAndy Nichols2021-09-031-4/+4
| | | | | | | | | | | | | | It is not enough to just call qt_copy_or_install with a DESTINATION value prefixed with only ${INSTALL_QMLDIR}/ because for non-prefixed builds this will install relative to the directory this cmake file is in. Instead we have to combine ${QT_INSTALL_DIR} with the target path to make sure the final path is always correct. This pattern is used all over, so we muse do it as well. Change-Id: I571e19b42a611eaa1f368645e53114a99cb8fdaa Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit a5524a7544506e7915e9ab1d0ba3eaf687f401ed) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Fix documentation warnings in qtdeclarativeTopi Reinio2021-09-033-25/+24
| | | | | | | | | | | | | | | | | | | * QtLabsPlatform has its own documentation project, but its source directory was pulled into QtQuick docs, causing duplicate generation and warnings. * Fix \snippet paths for files that were renamed/moved around. * Clean up .qdocconf files, use the {,} syntax to set identical values for multiple variables. * Fix incorrect \sa link. Fixes: QTBUG-96125 Change-Id: I4c83787ac23a5b40019c74d46ee87c968a8d4907 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> (cherry picked from commit 5e6777be1d793740c184b4f49536b12fd83735b1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix top level builds where AUTOMOC_EXECUTABLE was unset on some targetsCraig Scott2021-09-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The qt_example_build_end() command tries to recursively find all build system targets by descending into all source directories. Some sets of examples re-use the same source directory multiple times with different build directories, but this hides all but one of those re-used source directories from the recursive search. This resulted in some targets being missed, which in turn prevented qt_autogen_tools() from being called on them. In top level builds, this meant AUTOMOC_EXECUTABLE wasn't set, so CMake tried to verify the moc it wanted to use, which doesn't exist for the first configure of a top level build, resulting in a fatal error. Since we can't find all targets reliably with a recursive search, manually handle the ones that could be missed. There was a similar problem with qt_autogen_tools() not being called for a target created to compile a doc snippet. The error message is the same as the case above, the cause is again AUTOMOC_EXECUTABLE not being set, but for a different reason. Apply the same fix and call it manually, which should have been the case originally. Fixes: QTBUG-96118 Fixes: QTBUG-96159 Change-Id: I079c696cf74f77d7caa2c59e6263d3fb1c55d20e Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 920a5f727b02cade81fac0a5536e52bbb4c72d73) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: link to Image's cache property in icon docMitch Curtis2021-09-032-0/+5
| | | | | | | Change-Id: I3b5c82f1b2c58be21b8db17c60421a3a2798b6d1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 6d0702b4d7f98325646eb1a4d2d0ea34263ce4f2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* docs/qtquick-bestpractices: Update documentationMaximilian Goldstein2021-09-021-51/+16
| | | | | | | | | | | | Modernizes the Bundle Application Resources section to use our new CMake API. Also removes the usage of ListElement as an example model as we want to discourage its usage. Fixes: QTBUG-96150 Change-Id: If234922501fb6bd39bce8345b2c3cc5fd1224b6f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit b262090c0226589282c377fe531cd3a1e713c729) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: try to make "on" syntax more discoverableMitch Curtis2021-09-022-0/+4
| | | | | | | | | | | | | Currently it's difficult for a user looking at the "on" syntax to find anything online by searching for "on syntax qml". The information is there, but it's not easily discoverable, as there's no way a user will know to search for "Property Modifier Objects" or "Property Modifier Types". Change-Id: I453e8626ac5fe6656cd8e5adbcfc0f80faf4be9f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit d3623d04ecceabff1a4a179079730102a804cae7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQmlListModel: Fix C++ owned object getting destroyedJaeyoon Jung2021-09-021-5/+3
| | | | | | | | | | | | | | | | | If an object is explicitly set as C++ owned, it should not be turned to destructible in any case. explicitIndestructibleSet flag is used for that and thus it should not be unset in any case. This fixes an issue where a C++ owned object could be destroyed by GC when it is added to a ListModel. An object is supposed to be set as destructible implicitly when it is used as a return value from JS unless explicitIndestructibleSet is set. Fixes: QTBUG-96167 Change-Id: Iad06847e56e29dd1b20146be108d7f747d8474dc Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Jaeyoon Jung <jaeyoon.jung@lge.com> (cherry picked from commit 219ca3bf2be65fb4f1741bdc7b53d6dc4a41dd31) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix include directories for QmlCompilerUlf Hermann2021-09-022-9/+8
| | | | | | | | | | | | | | QmlDevTools does not have a proper master include in a developer build (at least). Therefore, we cannot directly depend on it when building QmlCompiler. However, as both are static libraries, we can just inject the include directories of QmlDevTools into QmlCompiler, and make targets that use QmlCompiler depend on QmlDevTools explicitly. This only applies to 6.2 as we don't use QmlDevTools in dev anymore. Change-Id: Ie7a8759495982a18a42a714d9123307e008485f5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> 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>
* 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 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>
* Fix samegame example to use QML modulesUlf Hermann2021-08-311-17/+14
| | | | | | | | | | | | | | | | | | | | | | 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>
* 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>
* 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>
* 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>