| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a delegates declares a required property of a given name, and that
name exists as a role in the model, we set the property accordingly.
The same holds true for the special properties that come from the
QQmlDelegateModel like "index" and "model".
All roles are still injected into scope and thus accessible;
changing this in Qt5 would be tedious or even impossible while still
maintaining backwardscompatibility with delegates that do not use
required properties.
Change-Id: I4f388ba549c42f1ff9822bdb3b8357c4d45e4b66
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The model types are not part of the core QML runtime and should only be
loaded if you explicitly import them. We cannot enforce that in Qt5 as
some of them are available from the QtQml import, but we can change it
in Qt6.
Change-Id: I1e49e84d748e352537ec2d4af901c034c91d038f
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix warnings like:
sruntime/qv4serialize.cpp:378:45: warning: 'QVariant qVariantFromValue(const T&) [with T = QQmlListModelWorkerAgent::VariantRef]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations]
qml/qqmlvmemetaobject.cpp:597:61: warning: 'QVariant qVariantFromValue(const T&) [with T = QList<QObject*>]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations]
jsruntime/qv4engine.cpp:1319:66: warning: 'QVariant qVariantFromValue(const T&) [with T = QObject*]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations]
jsruntime/qv4engine.cpp:1350:60: warning: 'QVariant qVariantFromValue(const T&) [with T = QList<QObject*>]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations]
items/qquickitem.cpp:8396:78: warning: 'QVariant qVariantFromValue(const T&) [with T = QObject*]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations]
items/qquickitem.cpp:8693:80: warning: 'QVariant qVariantFromValue(const T&) [with T = QObject*]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations]
items/qquickgenericshadereffect.cpp:126:69: warning: 'QVariant qVariantFromValue(const T&) [with T = QObject*]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations]
items/qquickgenericshadereffect.cpp:127:55: warning: 'QVariant qVariantFromValue(const T&) [with T = QSize]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations]
items/qquickopenglshadereffect.cpp:713:69: warning: 'QVariant qVariantFromValue(const T&) [with T = QObject*]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations]
items/qquickopenglshadereffect.cpp:714:55: warning: 'QVariant qVariantFromValue(const T&) [with T = QSize]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations]
qquickcustomparticle.cpp:416:89: warning: 'QVariant qVariantFromValue(const T&) [with T = double]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations]
qqmlenginedebugclient.cpp:403:47: warning: 'QVariant qVariantFromValue(const T&) [with T = QQmlEngineDebugObjectReference]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations]
Task-number: QTBUG-74043
Change-Id: I14cb7d7c1fb8dc6321e32208a7de15f6bdb19065
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
VisualDataModel, VisualDataGroup, and VisualItemModel
are replaced with DelegateModel, DelegateModelGroup, and ObjectModel
respectively (since 7cad0e52c5a020bd29635e9912fd8946a6b48124).
git grep -l 'VisualDataModel' | xargs sed -i 's/VisualDataModel/DelegateModel/g'
git grep -l 'VisualDataGroup' | xargs sed -i 's/VisualDataGroup/DelegateModelGroup/g'
git grep -l 'VisualItemModel' | xargs sed -i 's/VisualItemModel/ObjectModel/g'
Change-Id: Ie91b37b204f08a5d1f1f38594fb22ed70a6e2080
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
| |
Otherwise you might be able to put INT_MAX in, which would cause
problems with things like memory allocations.
Task-number: QTBUG-54752
Change-Id: I758d04af65049181c0c741ff42e92a6450963201
Reviewed-by: Michael Brasser <michael.brasser@live.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When assigning a JS owned model or delegate to an item view, we must
ensure that they stay alive as long as the item view. This happens
easily for example when doing something like
delegate: Qt.createComponent(...)
This patch takes the minimally invasive approach by changing the QObject
parent of such objects.
Task-number: QTBUG-50319
Task-number: QTBUG-51620
Change-Id: Ie6384b8dd93dcdc62d49f64b38173b3fc4ffd3b3
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When receiving the modelUpdated signal from the delegate model, the
repeater - unlike other views - queries for the objects right away. That
may result in instant incubation and when using Packages, we will end up
delivering the initItem signal emission for the parts models via
QQmlDelegateModelGroupPrivate::initPackage for _both_ repeaters
immediately. For the first repeater that's expected, but for the second
repeater that means initItem is received before modelUpdated was called.
That is very confusing for the repeater as d->deletables is not set up
yet.
While it's possible to make the repeater more "robust" towards such
behaving models, it seems cleaner to make the model behave well, by
ensuring that we emit initItem after modelUpdated.
Task-number: QTBUG-50349
Change-Id: Id2f3ba135e34d0111c8896bb4ecdfe51c8c649da
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From now on we prefer nullptr instead of 0 to clarify cases where
we are assigning or testing a pointer rather than a numeric zero.
Also, replaced cases where 0 was passed as Qt::KeyboardModifiers
with Qt::NoModifier (clang-tidy replaced them with nullptr, which
waas wrong, so it was just as well to make the tests more readable
rather than to revert those lines).
Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In complicated cases where the model moves rows around while
the view is running slow (perhaps during high CPU load),
there were cases when Repeater would call
movedItem->stackBefore(deleteableItem), but deleteable items
can be null, so there was often an error
QQuickItem::stackBefore: Cannot stack before 0x0, which must be a sibling
and occasionally a crash. Now we check both the callee and the
parameter to stackBefore to make sure neither of them are null.
Task-number: QTBUG-54859
Change-Id: I45a8b2939c16b9bbe3a802ddd348dc55f51061a7
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some
exceptions, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/
Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one
(in those files which will be under GPL 3 with exceptions)
Change-Id: I04760a0801837cfc516d1c7c02d4f503f6bb70b6
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|
|
|
|
|
|
| |
The keyword no longer has a meaning for the new CI.
Change-Id: I699f2881e291cce02a6a608a8710638886e38daa
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
|
|
| |
Fix usage of API that is marked deprecated.
Change-Id: Ia887437f99b9ce207891ca19bc49294acb7d629d
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer).
- Replace Q[TRY]_VERIFY(smartPointer == 0) by
Q[TRY]_VERIFY(smartPointer.isNull()).
- Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and
add casts where necessary. The values will then be logged
should a test fail.
Change-Id: Ib9f4c2486af23c47990be4b9e004b965de226dcc
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
Preparing the replacement of Q[TRY]_VERIFY(a == b) by
Q[TRY]_COMPARE(a, b) for non-boolean types.
Change-Id: I8a4e44a2b4e20a9c8b811799e3932c8ce1a2cbbb
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
Use the same ordering as item views and release before unparenting.
Change-Id: I0346342cfcaf9385d8385769795dd5ba35fc43aa
Task-number: QTBUG-46828
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Following the ListModel API:
- object get(index)
- append(object)
- insert(int index, object)
- move(int from, int to, int n)
- remove(int index, int n)
[ChangeLog][QtQml][ObjectModel] Added get(), append(), insert(), move()
and remove() methods.
Change-Id: I592e55b7c4c933a1100191bf5a9405944b347172
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
| |
When listening for Component.onCompleted on the items emitted by the
Repeater, the items' stacking order was not properly set up.
The stacking order was corrected after Component.onCompleted was emitted,
which was undesirable in some cases.
Task-number: QTBUG-45423
Change-Id: Ib96b3de81db556b09fb5fc8bd27ce19223014f7e
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
since this breaks for asynchronous models, because item creation order
is not guaranteed. We always have the index
for what item to create, so we do not need it either.
Change-Id: Ib8ce25ac342f5cce4784c56e6a91cf70136566b3
Task-number: QTBUG-38879
Task-number: QTBUG-39001
Task-number: QTBUG-44250
Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.
Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9
Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This way, the indices for itemRemoved will make sense consistently.
This was broken with 5f5aba5b6e690ca54e66f41b93474f7e67e83c8b, dated November
2011.
Task-number: QTBUG-42243
Change-Id: I5fecfd4174049f51e0cec90e40e6332de5d5bf01
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
QVariant comparison in setModel() started failing because
JS arrays are now passed as a QJSValue. Re-assigning the
same array content should not trigger a model change.
This change restores the old behavior it had before, when
JS arrays were passed as QVariantLists.
Change-Id: I1882b3531f2893b116dbd817edeecab1ae812ce8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3 & LICENSE.GPLv2
- Removed LICENSE.GPL
Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It has been reported multiple times (with different back traces) that
the QQmlDelegateModel tries to access a dangling QQmlContext pointer.
The scenarios for reaching this point differ slightly, one such scenario
is very late model activity during the scene destruction. The provided
test-case simulates that and the provided patch guards the QQmlContext
in a QPointer.
Task-number: QTBUG-39780
Change-Id: I594ee4918cd1b78c5db5c164314e85e9eea99fbd
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
|
|
|
|
|
|
|
| |
remove trailing spaces and expand tabs
Change-Id: Ieacb9d096b612c45d1a64700044c114d1f7522bc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-200461
Change-Id: Ia8e48668960ac005cf773bf6f53da40f1c753b9b
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
|
|
|
|
|
|
| |
Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76
Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
|
|
|
|
|
|
|
| |
Change copyrights and license headers from Nokia to Digia
Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
Qt 5.0 beta requires changing the default to the 5.0 API, disabling
the deprecated code. However, tests should test (and often do) the
compatibility API too, so turn it back on.
Task-number: QTBUG-25053
Change-Id: I6988c2360e9d88916311374a0c910bfc5b607439
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
|
|
|
|
|
|
|
|
|
|
| |
Implement ListModel and XmlListModel using QAbstractListModel
instead.
Task-number: QTBUG-15728
Change-Id: I14e03d90883d341f4b1d89c1e9fc9dc1534fde78
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
|
|
|
|
|
|
|
|
|
| |
If the model was reset then regenerate and exit immediately rather
than processing the change set.
Task-number: QTBUG-26536
Change-Id: I9d4f20d450a5116957c9468ba6088caad026a497
Reviewed-by: Martin Jones <martin.jones@nokia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QQuickCanvas is now called QQuickWindow
QQuickCanvas::rootItem is now QQuickWindow::contentItem
QQuickItem::canvas is now QQuickItem::window
QQuickItem::ItemChangeData::canvas is also renamed window
QQuickCanvas::grabFrameBuffer is now QQuickWindow::grabWindow
The functions related to the color property have dropped the clear from
their names.
The first three changes have interim compatibility measures in place to
ease the transition.
Change-Id: Id34e29546a22a74a7ae2ad90ee3a8def6fc541d2
Reviewed-by: Martin Jones <martin.jones@nokia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The repeater item previously stored a raw QObject pointer in
a variant. When this pointer was a dynamic list model element
that was deleted, the variant would continue to hold a stale
pointer. Change repeater to use a guard object to hold the model
when it is a QObject. Continue to use a variant to hold models
that are not based on QObject to maintain same semantics.
Change-Id: Ie100947132923803263c725e86efa68206382f12
Reviewed-by: Martin Jones <martin.jones@nokia.com>
|
|
|
|
|
|
|
|
|
| |
- Changed tests to use TESTDATA
- added check for cross_compile option to skip when sources not available
Change-Id: I1f382794ff982bbc07fc20438a4e4a8c8b8d565f
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
|
|
Symbols beginning with QDeclarative are already exported
by the quick1 module.
Users can apply the bin/rename-qtdeclarative-symbols.sh
script to modify client code using the previous names of the
renamed symbols.
Task-number: QTBUG-23737
Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66
Reviewed-by: Martin Jones <martin.jones@nokia.com>
|