aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types/qqmldelegatemodel_p.h
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2017-11-08 11:01:35 +0100
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2017-11-30 07:36:05 +0000
commit816b5a667f0b5b47c3f80c2c775535310c89b727 (patch)
tree191e96ceb0aaa24bbbf17a9d2b056f641143b6ec /src/qml/types/qqmldelegatemodel_p.h
parent60d589ccddb036e84883a6c2ef63a5292c8ad022 (diff)
QQmlDelegateModel: add incubationStatus(), and use it to determine 'requestedIndex'
We used to assign the currently incubating item to 'requestedIndex' based on requested incubation mode alone. This is not sufficient, as the item can also be loaded async when the mode is AsyncIfNested. To check if the item is really loading async (and that we're not getting nullptr because of some other failure), we need to ask the incubator. Task-number: QTBUG-61537 Change-Id: Id1f458db4a7584a6b58d5bad0e7832ce4fc341dc Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/qml/types/qqmldelegatemodel_p.h')
-rw-r--r--src/qml/types/qqmldelegatemodel_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/types/qqmldelegatemodel_p.h b/src/qml/types/qqmldelegatemodel_p.h
index 5ae2d48969..71179fd8be 100644
--- a/src/qml/types/qqmldelegatemodel_p.h
+++ b/src/qml/types/qqmldelegatemodel_p.h
@@ -115,6 +115,7 @@ public:
void cancel(int index) override;
QString stringValue(int index, const QString &role) override;
void setWatchedRoles(const QList<QByteArray> &roles) override;
+ QQmlIncubator::Status incubationStatus(int index) override;
int indexOf(QObject *object, QObject *objectContext) const override;