aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* QQmlDelegateModel: build fixGiuseppe D'Angelo2021-04-201-1/+1
| | | | | | | | Capturing of `this` via `[=]` is deprecated in C++20. Be explicit. Pick-to: 6.0 6.1 Change-Id: Ic3b0a14c8eea83afbd17e97a2e3cdefbce045ff2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2021-04-201-3/+3
| | | | | Change-Id: Idb5217757a3de011c6b1c95ab4bc4d4dccc985fb Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Fix C4267 warning in qqmlirbuilder.cppKai Köhne2021-04-201-2/+2
| | | | | | | Fixes: QTBUG-92966 Pick-to: 6.1 Change-Id: I9acdb0d624a0950f9e28c6463530b27d282123e2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmllint: Warn about multiline stringsMaximilian Goldstein2021-04-207-15/+94
| | | | | | Task-number: QTBUG-92448 Change-Id: Ic6305f05cb8a0af5c36ac03d8b541ac78cea0612 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2021-04-201-3/+3
| | | | | Change-Id: I41526055b3e8851d9d401b15fe816241a4d84d39 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Properly export QQuickDrag and QQuickDragAttachedUlf Hermann2021-04-201-2/+3
| | | | | | | Those are mentioned in the qmltypes. They should be available. Change-Id: I934f2b2282dfbee903d7b53b1e5ab0ca6ca46368 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2021-04-201-3/+3
| | | | | Change-Id: I4d12976406cf1933f377cbcc59de4b01f6486d13 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2021-04-201-3/+3
| | | | | Change-Id: I17c3efc5b9481be1462750f43e6c77ede1807112 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Optimize property capture for known property cachesUlf Hermann2021-04-193-31/+61
| | | | | | | | If we already know the property cache and data we don't have to look them up again in captureProperty(). Such lookups can be expensive. Change-Id: I94553260311912c5acee3105295f124721203e01 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Clear passive grabbers on press in QQWindow not in DeliveryAgentShawn Rutledge2021-04-192-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | In case the window's main scene and a subscene both contain handlers, and one of the handlers in the main scene takes a passive grab on press, we don't want to lose it while we are delivering to the subscene. For example in Qt Quick 3D's dynamictexture example, if you click on one of the doors, the TapHandler in the View3D grabs on press; but the door also has a 2D subscene, which allows dragging (either dragging one yellow note item, or flicking the ListView). If you drag, the TapHandler does not detect a tap; if you tap, nothing gets dragged. So this is an example of a cooperative scenario involving multiple DeliveryAgents at the same time: a passive grab can occur in the main scene, an exclusive grab can occur in the subscene, and they don't interfere with each other. But if we clear the passive grab while delivering to the subscene, the TapHandler does not get a chance to detect a tap. So we should do that only once, when the window receives the press event. Amends 68c103225f4e8bd6c1b18ef547108fd60f398c0f Task-number: QTBUG-92944 Pick-to: 6.1 Change-Id: I9f064764a17b1efe758909f61fca6658f65d43e5 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* qqmlirbuilder: Fix treating parser warnings as errrosMaximilian Goldstein2021-04-193-1/+18
| | | | | | | | | | Previously parser warnings (i.e. inline components having lowercase names) were treated as errors. Because these were not handled properly this also resulted in the QQmlComponent with the warning never becoming ready. This resulted applications hanging instead of terminating. Pick-to: 5.15 6.0 6.1 Change-Id: Ia5ad3b54edc1b94dd94d0bf771c3494691abec71 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Document that QML_SINGLETON only works with QObjectsMitch Curtis2021-04-191-7/+8
| | | | | | Pick-to: 6.1 6.0 5.15 Change-Id: I18c38037cd635fa3300c761b16038b67ac3b0d74 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove documentation references to NVPR rendererAndy Shaw2021-04-192-44/+11
| | | | | | | | | | Since this is no longer supported, it is removed from the docs Pick-to: 6.1 6.0 Change-Id: Id23716594e6ea9fd3d05d88a2586d380d1db09db Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Nico Vertriest <nico.vertriest@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2021-04-191-3/+3
| | | | | Change-Id: I3f12849d490052096ed8dd38ccb54f115a1bd570 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Optimize the case of AOT functions returning QObject*Ulf Hermann2021-04-191-6/+17
| | | | | | | | | | We don't need to go through all the metatype construction, conversion, and destruction if we know that both the expected and the actual return types are QObject pointers. We can just check if they're compatible and assign if they are. Change-Id: Ic5ab13536cf2e0e2a982ed9a9be81eb5927e85c2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Adjust to QProperty using eager evaluationFabian Kosmale2021-04-195-10/+17
| | | | | | | | | | | | Besides API changes, we need to - adjust QQmlBind to unlink the binding properly (that probably was broken already before, but did not cause issues so far, as the old binding would not have been evaluated without a read access) and - skip tests in tst_qmlcompiler_manual, as the bindings are executed before the engine is correctly set. Change-Id: I97b0ac32b428c1a033664fe8593effadb69cd348 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Don't pre-resolve the QQmlContext for AOT functionsUlf Hermann2021-04-194-8/+14
| | | | | | | | We only ever need it to retrieve the QQmlEngine. However, resolving the context can involve an allocation. Change-Id: I064fd528fa7ab9bd37043c5dd1c62d17ea9380e3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix qdoc warnings from wrong linking attemptsVolker Hilsheimer2021-04-191-7/+7
| | | | | | | | Document parameters with \a, and link to other members correctly. Pick-to: 6.1 Change-Id: I3529aa96fff0e5b78faa7438f40dc217de7b6262 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* qmllint: Warn about deprecated functionsMaximilian Goldstein2021-04-199-0/+88
| | | | | | | | | Now qmllint will also warn when functions have a Deprecated annotation which previously only applied to properties and elements. Task-number: QTBUG-84895 Fixes: QTBUG-79857 Change-Id: Ie1436822dc06bfd1ee4305a8468900409c3f8b0a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix build without features.qml-sequence-objectTasuku Suzuki2021-04-191-0/+2
| | | | | Change-Id: I2da9712201f3057b4d20aa0176716442d69d0ab9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix documentationVolker Hilsheimer2021-04-171-1/+1
| | | | | | | | | The '### Qt 7' comment between documentation and function definition breaks qdoc's matching logic, so put the comment above all that. Pick-to: 6.1 Change-Id: I4a6786422d8c30a257f09d630351a878c64bd377 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQuickTextInput: update cursor rectangle after padding changedWang Chuan2021-04-163-0/+51
| | | | | | | | | | The position of cursor delegate needs to be updated when we change padding, otherwise it will be in a wrong position. Fixes: QTBUG-91867 Pick-to: 5.12 5.15 6.0 6.1 Change-Id: I89ca84fe893ebf517ab67890196eede14a4055d7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQuickItem::forceActiveFocus(): actually force active focusShawn Rutledge2021-04-163-0/+94
| | | | | | | | | | | | | | | | | | | | It was trying to get by with setFocus() but that doesn't always work, in cases when the item's d->focus flag is true (leftover state) but it doesn't actually have focus anymore after a reparenting scenario. Item.focus represents the intention to be focused when possible, and does not necessarily change due to environmental circumstances, such as having its parent reparented. QQuickItem::setFocus(true) returns early if the new requested focus state is the same as the stored d->focus; so it was not enough for foceActiveFocus() to call only setFocus(). In the bug, TextInput and Loader both get stuck in the state d->focus == true, so forceActiveFocus() did not do anything before. Pick-to: 5.15 6.0 6.1.0 6.1 Fixes: QTBUG-89736 Change-Id: Ib7f4caccf81b60a02e2655332b64efba4d1fd7cf Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix documentation of QQmlListReference::sizeVolker Hilsheimer2021-04-161-1/+1
| | | | | | | | | Amends ca06d488f3c5d899c008b431f6939793813243cb. count was already documented. Pick-to: 6.1 Change-Id: I2f79d132f29ae03f03dd7204ea09e4841971d650 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmlpreview: Fix preview position is out of scope warningMaximilian Goldstein2021-04-162-8/+11
| | | | | | | | When the position was restored with setPosition() in many cases the window size was invalid leading to a false "preview position is out of scope" warning. Task-number: QTBUG-83391 Change-Id: I8cdbc7701585b3cce526998fcdd25ed3c16fecbc Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Add CMakeLists.txt.user to .gitignoreMitch Curtis2021-04-161-1/+1
| | | | | Change-Id: Ieef0f9e5a8899211eaf7a67060a1e3ed785f9359 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmltyperegistrar: Do not omit change signals from qmltypes filesFabian Kosmale2021-04-164-21/+17
| | | | | | | | | | | | | | | qmltyperegistrar used to omit change signals from qmltype files if they had neither a version nor arguments. This does however cause issues with the semantic analysis of signal handlers, who in this case would not find the matching signal. Instead of adding additional logic in qmllint and any other place which might need that information, we now simply write out those signals, too. Pick-to: 6.1 Fixes: QTBUG-92372 Change-Id: Iaa6137c5d45f94e4874dc285e23a24f9c8319bb6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix build without features.mainwindowTasuku Suzuki2021-04-161-1/+1
| | | | | Change-Id: I497207567fe940bc077804b58db79bc5d44ae9f0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* qmltyperegistrar: Warn about classes using future revisionsMaximilian Goldstein2021-04-161-0/+27
| | | | | | | | | | | If a class using a future revision is registered for a module this can cause unforeseen consequences such as unintentionally bumping up the default version for unversioned imports. This has caused (among other bugs) the issue described below. Task-number: QTBUG-92861 Change-Id: I53e9e475ec2bc711c4a6e45900491364f7243f8f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qqmljsannotation: Use std::variant instead of QVariantMaximilian Goldstein2021-04-163-7/+45
| | | | | | | Makes it easier to reason about the values stored in QQmlJSAnnotation. Change-Id: I13bf8294a25f00edf78fad3b2b91fbc7a313d49e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmllint: Fix non-existent default property for ComponentMaximilian Goldstein2021-04-163-0/+10
| | | | | | | | Before children of Component caused errors about a non-existing default property. Task-number: QTBUG-92571 Change-Id: I702ea79cf18221c35be48a86c6da35e809de073f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Rework qmljsrootgenUlf Hermann2021-04-166-399/+1600
| | | | | | | | | This way it actually generates interesting data about the JavaScript types, for example the functions of the String prototype. Add a helper method to create a symbol to QJSEngine. This should be generally useful. Change-Id: I6c7b253b9d6cdb61602ceeae0955aed8d942c139 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix QQmlContext::nameForObject()Ulf Hermann2021-04-163-14/+48
| | | | | | | | | | | | | nameForObject() should not search the linked contexts. Linked contexts are not reachable from the "head" context in QML. However, it should search context objects, just like contextProperty() does. [ChangeLog][QtQml][Important Behavior Changes] QQmlContext::nameForObject() now finds properties of context objects, but it does not search unrelated other ("linked") contexts anymore. Change-Id: Ic6e01fddf3e2d4b3a1bc7308e126f47fae7cd6d1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Provide an objectForName() function in QQmlContextUlf Hermann2021-04-164-25/+136
| | | | | | | | This is the reverse of nameForObject(). We don't need to wrap id'd objects in QVariant just to unwrap them again at the call site. Change-Id: Ie1c5382af33b5c05b0b931fcc5bcf8d232d27c21 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2021-04-161-3/+3
| | | | | Change-Id: Iddae4786f2e2ee3668d608c149fc718fca4e92e7 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Fix build without features.gesturesTasuku Suzuki2021-04-161-0/+2
| | | | | | Change-Id: I9c5cb83ad45b7af7060fee2fed593da7efae7158 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* CMake: Fix qml module version to use the repo project versionAlexandru Croitor2021-04-1534-34/+34
| | | | | | | | | | | Use PROJECT_VERSION instead of CMAKE_PROJECT_VERSION, so that the repo project version is used in a top-level build, rather than the version of the qt5 project. Pick-to: 6.1 6.0 Task-number: QTBUG-92861 Change-Id: I5a7a09baf81353558e512800746ac24e8e8b9a47 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Streamline retrieval of context property names and IDsUlf Hermann2021-04-157-45/+51
| | | | | | | | Most of this can be inline, and we never need to copy the actual identifier hash. Change-Id: I6468b6b1a571e4854c00c865a2aa57c3b2f0ca8c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix build without features.settingsTasuku Suzuki2021-04-151-1/+4
| | | | | Change-Id: I176a5b166bcdfdbfc13987d9f1d4a89e2e3d47b6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix build without features.textmarkdownreaderTasuku Suzuki2021-04-152-0/+6
| | | | | Change-Id: Ie385488133838fcbea8f848f595f45511a341fe0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix build without features.itemmodelTasuku Suzuki2021-04-154-27/+21
| | | | | Change-Id: I12073e43b34d7c72b441aaf081e4210a3161b4e8 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2021-04-141-3/+3
| | | | | Change-Id: Ib21fd874969b003763b1894db16cc83fc2074314 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Rename the AOT context to aotContextUlf Hermann2021-04-141-7/+7
| | | | | | | We want the "context" name for other things. Change-Id: I9dcc88a9a7c7f5e8c495ee29f57e2c9d15c4990f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qqmljsmetatypes: Use all members in operator== / qHashMaximilian Goldstein2021-04-141-1/+4
| | | | | | Change-Id: Iddcb4ce6859fb433f57e6449630dae39dd8e85f4 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix QQmlJSImportVisitor::visit(UiObjectBinding *)Andrei Golubev2021-04-1410-15/+228
| | | | | | | | | | | | | | | | | | | | | | | | Visit UiObjectBinding shouldn't create any properties, otherwise we end up having invalid QQmlJSScope state in cases with attached properties (and maybe somewhere else) property QtObject prop: QtObject {...} is parsed as two AST elements: 1. As UiPublicMember, which handles a property definition "property QtObject prop" (and, consequently, creates the property) 2. As UiObjectBinding, which handles a property assignment "prop: QtObject {...}" As a drive-by, refine the endVisit(UiObjectBinding *), which sets the property type. Now, only update the property when property already exists and when the new property type has the same type hierarchy (in other words, property type must be a base of a new type). At the moment endVisit() issues an error if either of the preconditions is not satisfied Test the fix through tst_qmllint Change-Id: I149090ffe46ae86268dd2c3b0ec3713b6bde0627 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Check thisObject when calling various methods on URLUlf Hermann2021-04-142-38/+186
| | | | | | | | | We should not crash when you try to call them on the wrong object. Rather, throw a type error. Pick-to: 6.1.0 6.1 Change-Id: I1b146d9c77d838e013408988e02a65a623641f1f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* add "double" into the list of built in QML typesEvgeniy A. Dushistov2021-04-142-1/+2
| | | | | | | | | Also this fixed "property type checking" for qmllint in case of QML code like "property double xyz" Fixes: QTBUG-92566 Change-Id: Ice33be4287ce0eba2cf9dfaabb760406bdca02b7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Increment QV4_DATA_STRUCTURE_VERSIONFabian Kosmale2021-04-141-1/+1
| | | | | | | | | The bytecode format has been changed, as two new instructions were added. Amends 5f7ecce23321f499b1b002c32a27c63815535baa. Change-Id: Ie81651a48eec38b014e3bc859cc8ecb0cf8396d0 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmllint: Fix QQmlComponent default property incompatible type warningsMaximilian Goldstein2021-04-143-0/+10
| | | | | | | | | Assigning any element to a QQmlComponent property implictly wraps it into a Component. Thus checking for compatible types does not make sense here. Fixes: QTBUG-92571 Change-Id: Id72f69d30d8506193c52a51b038b9c218ac85917 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmlformat: fix QFSFileEngine::open: No file name specifiedEvgeniy A. Dushistov2021-04-141-11/+13
| | | | | | | | | | | | | | | | Since commit d48b87450327e710f7b0a843627624aa67cae116 qmlformat prints the message: QFSFileEngine::open: No file name specified on normal usage like: qmlformat path/to/qml qmlformat -i path/to/qml This is because it tries to open the file specific by the "files" option event if no such option was passed. Pick-to: 6.0 6.1 Change-Id: Id14247210fc77a3f10dc25866607a9952fe81dfa Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>