aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlmodels
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | | | | | | | V4: Check for exceptions before we use the result of a JS callUlf Hermann2020-01-231-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the call resulted in an exception the return value is undefined. Task-number: QTBUG-81581 Change-Id: Ibfdd5e1229cf5437f270232d3b1a91308adeec72 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| | * | | | | | | | | Fix documented types for DelegateChoice propertiesMichael Brasser2020-01-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I0a5907354e7a983e7c7ad36aa9d86c3bf87d264e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | | | | | | | | | Properly refcount QQmlDelegateModelItemMetaTypeUlf Hermann2020-01-286-24/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consistently store it in QQmlRefPointer so that it doesn't leak. Change-Id: Id1f06228f6eb477b758901d61c1b71928671dc6a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | | | | | | | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-204-18/+20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlvaluetype.cpp tests/auto/qml/qml.pro Change-Id: I78f992f83212bb9fd5e09b64163f15f046185224
| * | | | | | | | | | Replace QVariant::type with QVariant::userTypeOlivier Goffart2020-01-174-18/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | as type is going to be deprecated. This change was done automatically with the help of clazy. In addition, ColumnRoleMetadata was changed to take an int instead of a QVariant::Type Change-Id: Ibc02d7b52e7d931a56c19fdebc4788b5e6df2a39 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | | | | | | | | Drop all the .2 from import directoriesUlf Hermann2020-01-171-1/+1
| |_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No one is going to import version 1 of those anymore, and we will be able to export multiple major versions from the same plugin in Qt6. Change-Id: Icb2b80d349498f0e7c14d27ebba76f3d100d85e8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | | | | | | | Make QtQml work with the latest changes in qtbaseLars Knoll2020-01-142-44/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust the code to work with the new QString and QVector data structures that have inlined size and data pointers. Fix a large bunch of compiler warnings from QFlags. Update dependencies for qtbase and qtsvg Change-Id: Iba237aed90c140b822e0cf501b9fb7156ec27c2d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | | | | | | | | Fix maximum minor to 15 for importsUlf Hermann2020-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QT_MINOR_VERSION resets to 0 in dev. Change-Id: I0b0210c3664c8c42b5dfabf13abac2beef2a0e34 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | | | | | | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-01-144-123/+51
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/folderlistmodel/plugin.cpp src/imports/layouts/plugin.cpp src/imports/localstorage/plugin.cpp src/imports/models/plugin.cpp src/imports/particles/plugin.cpp src/imports/qtqml/plugin.cpp src/imports/qtquick2/plugin.cpp src/imports/shapes/plugin.cpp src/imports/statemachine/plugin.cpp src/imports/testlib/main.cpp src/imports/wavefrontmesh/plugin.cpp src/imports/window/plugin.cpp src/imports/workerscript/plugin.cpp src/qml/jsruntime/qv4sequenceobject.cpp src/qml/qml/qqmlengine.cpp src/qmlmodels/qqmlmodelsmodule.cpp src/qmlmodels/qqmlmodelsmodule_p.h src/qmlworkerscript/qqmlworkerscriptmodule.cpp src/qmlworkerscript/qqmlworkerscriptmodule_p.h src/quick/items/qquickitemsmodule.cpp Change-Id: I5f1fbc3d00e8f583d2c89afc5389de84d68633a7
| * | | | | | | | | Generate registrations for all importsUlf Hermann2020-01-103-21/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we can generate all QML type information at build time, we should also use it. Move the types for QtTest into the testlib import plugin. They don't need to be exported from QtQuickTest. Trigger the resource initialization of the shapes library from the plugin so that we retain a dependency and the linker doesn't optimize the module initialization away. Change-Id: Icc8cb338aa03ef1e3085e29356a5db7b73ba0a01 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * | | | | | | | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-091-32/+44
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/particles/qquickitemparticle.cpp src/qmlmodels/qqmladaptormodel.cpp tests/auto/particles/qquickitemparticle/tst_qquickitemparticle.cpp Change-Id: Ibd8fbb91da6893a09f4ffe61ad0b95d8149bbc87
| | * | | | | | | | QQmlAdaptorModel: Guard access to wrapped AIMUlf Hermann2020-01-021-32/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QAbstractItemModel may be nullptr, in particular when it gets deleted from the outside. In some places we did check for that, via operator T* from QQmlGuard, in others we didn't. The checks were quite hard to read as "if (model)" first invokes a conversion operator on a base class and then implicitly converts the result to bool. Similarly adventurous, "if (*model)" invokes operator* on a base class and then converts the result to bool. Make all the checks explicit, and add new ones where they were missing. Also, as we already retrieve the AIM in order to check it for nullptr, re-use it for the actual operation. Task-number: QTBUG-80963 Change-Id: I3548e22e9d2bef485a1cd4acf70839eb8e599e62 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | | | | | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-1212-170/+348
|\| | | | | | | | | | |_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/types/qqmlbind.cpp Change-Id: Ib992d1a7ac6c1a96d39819be6f23955dc31b44b2
| * | | | | | | | QQmlDelegateModel: Use QMultiHash where it was intendedMårten Nordheim2019-12-102-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since insertMulti is going away Change-Id: I1ad91f3788648b807cb09f54e54ddce39c6ce06a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | | | | | | | QQmlDelegateModel: implement support for reusing itemsRichard Moe Gustavsen2019-12-043-28/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Take the shared reuse pool into use, and implement delegate item recycling in QQmlDelegateModel. The implementation is more or less a copy of the strategy followed in QQmlTableInstanceModel. Change-Id: I80953ec617f586774a240e7c6790b7777e7b64b8 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | | | | | | | QQmlTableInstanceModel: factor out reuse poolRichard Moe Gustavsen2019-12-047-102/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Factor out the reuse pool logic in TableInstanceModel into a separate class, so that we can share it with the upcoming implementation for recycling items in QQmlDelegateModel. Change-Id: If8f700b7a0208bac7d1cb1de087792e2c3a9b512 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | | | | | | | QQmlDelegateModel: Read values from the correct objectUlf Hermann2019-12-031-13/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we have a proxyObject, we need to use that one for reading proxy values. Otherwise the read operation will crash. Fixes: QTBUG-80420 Change-Id: I88cd5499802bff1aea2e43da9ab61d6565ab7ede Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * | | | | | | | QQmlInstanceModel::ReleaseFlags: add enum value 'Pooled'Richard Moe Gustavsen2019-11-282-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we're about to add support for delegate item recycling in ListView, we need to add an extra enum value to the ReleaseFlags. This will be needed later so that ListView can distinguish between items that are still referenced and visible in the viewport, and items that not referenced, but at the same time, still alive in the pool. Change-Id: I4a1110b6b43ba109ccd160d22010569dd5410829 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | | | | | | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-261-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/qmldirparser/qqmldirparser.cpp src/qml/qmldirparser/qqmldirparser_p.h Change-Id: Ia68a8d4f345e6e456eebc3f215fc90d3819ddd70
| | * | | | | | | QQmlDelegateModel: Use cache item's index for resolving delegatesUlf Hermann2019-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The raw index doesn't take the filter group into account. Fixes: QTBUG-78297 Change-Id: Ie6514c8acdc380fe3f8f267d02335afc357abd17 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Joshua GPBeta <studiocghibli@gmail.com>
| * | | | | | | | Avoid initializing QFlags with 0 or nullptr in further casesFriedemann Kleint2019-11-252-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends 744e77b841878fb017c0f2d60607090008f28180. Change-Id: I16e37aaf503eb62f67fca0e48be4c92c4a72ae46 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * | | | | | | | QQmlDelegateModel: Set extraObject only if required properties givenUlf Hermann2019-11-221-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we would set the same object as extraObject and as contextObject. That spells trouble when tearing down the context. Fixes: QTBUG-79958 Change-Id: I97fd0bf111304d06cff35eda46d4b4c6eefdaccc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * | | | | | | | Avoid initializing QFlags with 0 or nullptrAllan Sandfeld Jensen2019-11-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is being deprecated. Change-Id: I844bd92af85bc53a8fc0371408d05277bd49f511 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * | | | | | | | Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2019-11-229-13/+23
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlextensionplugin.cpp tests/auto/quick/qquicktableview/tst_qquicktableview.cpp Change-Id: Ic58d36a8532015bae30f2690063db9829b3bf372
| | * | | | | | | TableView: use fetchMore() when scrolling to the end of the tableKari Hormi2019-11-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQmlTableInstanceModel implements canFetchMore and fetchMore functions, but these are not called at any point in QQuickTableView. This change checks if additional data can be fetched when atYEndChanged signal is emitted. Fixes: QTBUG-78273 Change-Id: I49b41b09d9a218826b34f32cd9fe4724a6097b52 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * | | | | | | QQmlTableInstanceModel: always emit index changed when an item is reusedRichard Moe Gustavsen2019-11-143-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When reusing a delegate item, it can sometimes happen that the item ends up being reused at the same location in the table as it had before it was pooled. And in that case, we don't emit changes to index, row and column since they technically didn't change. The problem is that the model might have changed in-between, e.g if a row has been removed. And in that case, row and column will, even when unchanged, point to other parts of the model. So all bindings needs to be reevaluated to ensure that the values they use are refreshed. This patch will therefore ensure that we always emit changes to the mentioned properties when an item is reused, regardless if they change or not. Fixes: QTBUG-79209 Change-Id: Icec201a43a30b9f677303fbf652baf6487621deb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * | | | | | | Doc: Fix documentation warningsTopi Reinio2019-11-115-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were a lot of documentation warnings introduced by the separation of QtQml.Models and QtQml.WorkerScript modules from the QtQml documentation project into their own sub-projects. Fix the above, and also ensure that the experimental Qt.labs.qmlmodels QML types are listed in the documentation, and add them also on the QML module page for QtQml.Models. A few warnings remain, they may be indicative of issues not in the scope of this commit. Fixes: QTBUG-79812 Change-Id: Idc25c976e4c96feab4aae893519d6c9245f57a64 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | | | | | | | Take a copy of the children list before emitting the destroyingItem signalLars Knoll2019-11-011-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clear() emits a signal for each item that is being destroyed. Unfortunately that signal can be connected to some other place that already removes the item indirectly. In that case, we would not correctly emit the destroyed signal for all items, leading to errors later on. Fixes a test failure in Qt Quick Controls 2 Change-Id: I3aff75d9263badd9f87883610c7a00a94ee823d3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | | | | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-221-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I86768778e17ea9f35c1883429ba19e4f14fb3696
| * | | | | | | | QQmlObjectModel: Return object property from variantValue()Ulf Hermann2019-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Returning a context property was a strange choice. We want to get rid of context properties. [ChangeLog][Important Behavior Changes] The QML ObjectModel type had an undocumented "feature" which made it sort items in list views into sections according to context properties of the QML context the created objects belong to. Instead of context properties, object properties are used now. Change-Id: Ibd94c903910f0cdb76ead50db92a24eefebfa3fc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | | | | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-1612-2090/+80
|\| | | | | | | | | |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qmlmodels/qqmlmodelsmodule.cpp Change-Id: Ibae188f554f931f64f39022417b10e3469685f82
| * | | | | | | Models: Move labs classes into src/imports/labsmodelsUlf Hermann2019-10-1511-2089/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to have only one import URI per library. Change-Id: I8be524cf361b12bcb423c9efccd4e047ae3d8d0e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | | | | | VDMAbstractItemModelDataType: ensure meta-type is initializedRichard Moe Gustavsen2019-10-141-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the delegate chooser can call value() on a delegate model before the first call to createItem(), we need to ensure that all structures (and in particular, m_rolenames) are populated also in this case. This is especially important for cases where value() is called for every item in the model, as is the case for e.g. auto-completion for combo boxes, as delegate creation is particularly expensive there. Task-number: QTBUG-78858 Change-Id: I66138d74839b9645d11c69c29f2e70264c65a68d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | | | | | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-122-8/+17
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I3a13e84b77e1c6c3a85ef000d2bfbadbc72651bb
| * | | | | | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-112-8/+17
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1359574c7d89aaf3328958e2f667ba1e599ff7f1
| | * | | | | | QML ListModel: Emit a warning when adding an object with undefined or null ↵Fabian Kosmale2019-10-102-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | member The current code in ListModel simply did a reset of an existing property, in case a role existed and was set to null/undefined. If the role did not exist, the code would simply skip over the member and do nothing. However, this does not make any sense for newly inserted items, and most likely indicates a misunderstanding of how ListModel works. Creating an undefined/null role does not really make sense, as those could only ever store a undefined/null value. Change-Id: I4c1361647a82146565eaffe064598c94c748b4f5 Task-number: QTBUG-63569 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | | | | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-113-4/+20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib623d34a523b3f2956561f583e19c92f34ab21b4
| * | | | | | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-103-4/+20
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2835748c27616103f275849141fbe5a93e3dfd8c
| | * | | | | | When a DelegateModel delegate changes, refill the viewShawn Rutledge2019-10-092-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It looked a bit odd that the DelegateModel delegate property was not a notifying property. Adding the delegateChanged signal makes it easier to update the view when this happens. The previous approach of removing all delegates and adding all new ones resulted in the view losing its currentIndex and often scrolling to a different place. It's also nice to reduce the number of d-> indirections by adding the QQuickItemViewPrivate::applyDelegateChange() function, so that we just need one indirection to call it, and then it updates all the internal stuff in one place. Done-with: Frederik Gladhorn Done-with: Joni Poikelin Fixes: QTBUG-63477 Change-Id: I2d17fd11ff4a2fcb20968a7182dd2c403abb715a Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * | | | | | QQmlListModel: handle nested list models during iterationFabian Kosmale2019-10-081-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ListElement::getProperty returns in turn a list model The ModelObjectOwnPropertyKeyIterator should however return the concrete values, and not some proxy object. This would cause funny return values in the best case, and a crash in case of QTBUG-79083. We therefore convert the nested model to a JavaScript array in ModelObjectOwnPropertyKeyIterator::next, which avoids beforementioned issues. Fixes: QTBUG-79083 Change-Id: If038598ff1c3c59090e994aaba5fba94a6964224 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | | | | | Merge remote-tracking branch 'origin/5.15' into devLiang Qi2019-10-0723-24/+1408
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp Change-Id: Id2e81000bcbd4de18fe22b085fdf5eed42c02516
| * | | | | | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-0423-24/+1408
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/qtquick2/plugins.qmltypes src/quick/items/qquickitemsmodule.cpp Change-Id: I841c65c9c131354788b4f3fcfe3d7ed27be316d5
| | * | | | | | Move documentation for Instantiator and Package into QtQml.ModelsUlf Hermann2019-09-252-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie086399104de51ce0ae741f6fef316633ed47aa9 Reviewed-by: Martin Smith <martin.smith@qt.io>
| | * | | | | | Re-add documentation for Qt Qml ModelsUlf Hermann2019-09-1716-0/+1391
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It got lost when moving the classes. Change-Id: I7b3a9fec8fe9439c548da570e430d3b82613b816 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | | | | | doc: Add missing directories to qdocconf filesMartin Smith2019-09-162-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These might not be complete yet, but they do fix the qdoc errors. Change-Id: I75b0f0f7709a371149a6f7c82adfff9fe88408ea Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| | * | | | | | Merge remote-tracking branch 'origin/5.13' into 5.14Liang Qi2019-09-123-19/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4engine.cpp src/quick/handlers/qquicktaphandler.cpp src/quick/items/qquicktableview.cpp Done-With: Richard Moe Gustavsen <richard.gustavsen@qt.io> Done-With: Ulf Hermann <ulf.hermann@qt.io> Done-With: Shawn Rutledge <shawn.rutledge@qt.io> Change-Id: If9558a33f01693ce96420c094e0b57dfff0626cd
* | | | | | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-09-2712-22/+67
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/folderlistmodel/plugin.cpp src/imports/shapes/plugin.cpp src/qml/qml/qqmlengine.cpp src/qmlmodels/qqmlmodelsmodule.cpp src/qmlworkerscript/qqmlworkerscriptmodule.cpp src/quick/items/qquickitemsmodule.cpp Change-Id: Ib9215a07aa95b5801ce3cb7287f7903926e8c838
| * | | | | | | Specify parameters of type registration in class declarationsUlf Hermann2019-09-2611-22/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using this technique we can automatically register all necessary revisions and minor versions of a type, using the metaobject system. This greatly reduces the potential for mistakes and resulting incompatibilities between versions of imports. We assume that for each type we need to register all revisions of its super types and its attached type, and that the revisions match. That is, if you import version X of type A, you will also get version X of its attached type and of any super types. As we previously didn't take these dependencies into account when manually registering the types, a number of extra revisions are now registered for some types. Potentially, we can now generate the qmltypes files at compile time, using moc. Change-Id: I7abb8a5c39f5e63ad1a0cb41a783f2c91909491b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | | | | | QQmlDelegateModel: Fix QQmlDelegateModelItem::dataForObjectFabian Kosmale2019-09-251-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With required properties, we do not store the cache item as a context object anymore. To fix this, we repurpose the (space of the) incubator pointer of QQmlContextData to store the element there, and one of the dummy bits as a flag to indicate the new usage. Change-Id: I7cc435fc6781c603fe407411a60a6018239c972c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | | | | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-09-222-3/+36
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I801567c11fcc3244a1ee7dabeb5079d49fc5c3a1