| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
DelegateModel.inItems and DelegateModel.inPersistedItems were
wrongfully documented as of type int, when they are bool. This
patch corrects that. Reflow long lines as clang-format complains..
Fixes: QTBUG-86031
Change-Id: I4dee919b7008b5d3b2f492ed894891ac164a1217
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 06b3d7ceb732588633e51e6580675b2a2595fe8d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
| |
Pick-to: dev
Fixes: QTBUG-86025
Change-Id: I83ce650e788aecdf4bebfc6a6a4331554f2c6be5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Delegate items can be deleted when remove them from cache list. That may
cause a crash. So call referenceObject to keep the item from being
deleted.
Task-number: QTBUG-83352
Change-Id: Id5d7ab6dbf21682940f5393ea4e843c2448f7d81
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 37fcffa035d55ac00f85f57ce1390fff3be213c6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Qt 5.14 model items are directly deleted when draining the reusable
items pool, rather than calling deleteLater() on them. This may be
slightly more efficient and due to some unknown side effect the
deleteLater() call creates a memory leak.
Restore the direct delete in drainReusableItems().
Fixes: QTBUG-82000
Change-Id: Ia1027b1004c04e8aceaa5ff16a600849c46bf470
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
| |
Change-Id: I0117029ecbe7fc369c15fcd8a44f93797e95ab3e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
If the context is gone, we assume that the object is
currently torn down. Therefore we do not print an error
message in that case.
Fixes: QTBUG-82809
Change-Id: I74e5a4f41490ea9c13639c158a4d5fc0a52a38a4
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
| |
It is actually not needed, and declining to cancel the incubation leaks
memory.
Change-Id: I478ed2a4eef34bd27c716762a2fced1e9091607c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
This fixes the memory leaks from the "x items in the process of being
created at engine destruction" situation.
Change-Id: I65fe278ead3d4de0cbddc075972a6774b231814f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
QDoc will generate these notes automatically.
Task-number: QTBUG-37355
Change-Id: I8ed058ecbbcc630ad0351f6ce167c3fa61936f6f
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qmlmodels/qqmltableinstancemodel.cpp
src/qmlmodels/qqmltableinstancemodel_p.h
Change-Id: I89339b1cb41ba27fe30c79530859a1c2bfbecc69
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In the dtor we don't need to care about any side effects a direct
delete may have. Rather, any deleteLater() may not take effect
anymore as the event loop may be gone already.
Task-number: QTBUG-82000
Change-Id: I97935dc47fbbfd0c050e80c333c36a05f685c45d
Reviewed-by: Joni Poikelin <joni.poikelin@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The reusable items pool should only hold unreferenced objects.
Therefore, we can immediately delete them when draining. release() is
not suitable here because it unconditionally decreases and therefore
underflows the refcount.
Furthermore, the metatype is also refcounted, which means we should
keep it in a QQmlRefCounter in order to not leak references.
Task-number: QTBUG-82000
Change-Id: Iefdaaecc34342eb2e3b1e5a3281f2e46ac472347
Reviewed-by: Joni Poikelin <joni.poikelin@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The iterator may be invalidated by addCacheItem(). We can retrieve the
relevant properties before, though.
Change-Id: Ia3bbc50d16a7563097239177a75c9e2eab777a33
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I00e3f9535e819d9d0d547c9d3cf50be469cf9339
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The workerscript and models qmltypes are built from the library
directory, the testlib qmltypes are built from the plugin directory.
Change-Id: Ifc497aaf8204616ca817ee08ad86383ab2cbbdae
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I024445b3401a57040d7d67780ea32d2f8b02f41a
|
| |
| |
| |
| |
| |
| |
| | |
release() is const.
Change-Id: I00171af75151741e725cd2ceaa80afcaac4f62a3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The signal is used to tell the view that the item is definitely going
away. For the "view" based QQmlObjectModel that is almost never really
the case, except - oddly - for clear(). The view is typically a
QQuickItemView, which casts the item to a QQuickItem and calls
setParentItem(nullptr). That in turn is caught by QQuickContainer, which
calls remove() on the QQmlObjectModel. That is why remove() can't emit
destroyingItem().
Amends 6d0a453f41d304239285d64b06612c36922be701
Change-Id: I5d82def872550744b947b4b53447647327e03f67
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Task-number: QTBUG-79263
Change-Id: If518f644b5b9eddbacfb1cb16fbb557127ffcfb2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We can use it as model passed via a context property as shown in the
objectlistmodel example. We should also be able to pass it directly
then.
Change-Id: I55db74df969d8024553d9470f1afe4710e61b1bf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now that QQmlDelegateModel has an API that handles reusing
delegate items (*), we should also move the related signals
inside it to be consistent. This will also remove the need
to cast the model type in the views before connecting.
This patch will also remove warnings that stems from
QQuickListView trying to connect to the reuse signals
when the model is not a QQmlDelegateModel.
*: E.g: virtual ReleaseFlags release(QObject *object,
ReusableFlag reusableFlag = NotReusable) = 0;
Fixes: QTBUG-81257
Change-Id: Ia8a8f0d68e6ef7edc6c45b414121aaa77632bcd3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add unused volatile pointers to the type registration functions in each
import plugin. We need to do this in order to prevent the linker from
optimizing the registration away. There are two ways for this to happen:
When linking statically, the linker will examine the referenced symbols
on a per-object base and leave out all unreferenced objects. When
linking dynamically, the linker may do the same on a per-library base
and drop any unreferenced libraries from the dependencies. Forcing a
reference to the type registration function prevents both.
The volatile technique allows us to remove the previous qCDebug() hack.
Having an unused volatile auto variable should only result in a single
memory read as runtime overhead. The qCDebug() technique would generate
a read and a block of mostly dead code (as no one would ever use that
logging category).
Fixes: QTBUG-81622
Change-Id: I255667276dfd355b19baa17b1aad3db406bf1954
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|\|
| |
| |
| |
| |
| |
| | |
Conflicts:
src/plugins/qmltooling/qmldbg_debugger/qqmlenginedebugservice.cpp
Change-Id: I133bfd4bd9dd6f704252c956c90f05e8a8a40d6a
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| | |
Change-Id: I0a5907354e7a983e7c7ad36aa9d86c3bf87d264e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Consistently store it in QQmlRefPointer so that it doesn't leak.
Change-Id: Id1f06228f6eb477b758901d61c1b71928671dc6a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/particles/qquickitemparticle.cpp
src/qmlmodels/qqmladaptormodel.cpp
tests/auto/particles/qquickitemparticle/tst_qquickitemparticle.cpp
Change-Id: Ibd8fbb91da6893a09f4ffe61ad0b95d8149bbc87
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| | |
Since insertMulti is going away
Change-Id: I1ad91f3788648b807cb09f54e54ddce39c6ce06a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\|
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/qmldirparser/qqmldirparser.cpp
src/qml/qmldirparser/qqmldirparser_p.h
Change-Id: Ia68a8d4f345e6e456eebc3f215fc90d3819ddd70
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| | |
Amends 744e77b841878fb017c0f2d60607090008f28180.
Change-Id: I16e37aaf503eb62f67fca0e48be4c92c4a72ae46
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\|
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/qml/qqmlextensionplugin.cpp
tests/auto/quick/qquicktableview/tst_qquicktableview.cpp
Change-Id: Ic58d36a8532015bae30f2690063db9829b3bf372
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| | |
We want to have only one import URI per library.
Change-Id: I8be524cf361b12bcb423c9efccd4e047ae3d8d0e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\|
| |
| |
| | |
Change-Id: I1359574c7d89aaf3328958e2f667ba1e599ff7f1
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\|
| |
| |
| | |
Change-Id: I2835748c27616103f275849141fbe5a93e3dfd8c
|