aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlmodels/qqmladaptormodel_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-02-04 12:06:49 +0100
committerUlf Hermann <ulf.hermann@qt.io>2020-02-06 08:53:39 +0100
commit6ba3dc8d489be0058d8ca6349ac19b0857247b17 (patch)
tree3ebb3f732ae8d2e7668d612734980d82f6129e13 /src/qmlmodels/qqmladaptormodel_p.h
parent7d86b35dc6833057cae86d9a70e8f2c598c68db5 (diff)
Models: Make sure we can use QList<QObject *> as required model
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>
Diffstat (limited to 'src/qmlmodels/qqmladaptormodel_p.h')
-rw-r--r--src/qmlmodels/qqmladaptormodel_p.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qmlmodels/qqmladaptormodel_p.h b/src/qmlmodels/qqmladaptormodel_p.h
index ee4862f3b4..ba54c864c6 100644
--- a/src/qmlmodels/qqmladaptormodel_p.h
+++ b/src/qmlmodels/qqmladaptormodel_p.h
@@ -146,7 +146,10 @@ public:
return accessors->createItem(*this, metaType, index, rowAt(index), columnAt(index));
}
inline bool hasProxyObject() const {
- return list.type() == QQmlListAccessor::Instance || list.type() == QQmlListAccessor::ListProperty; }
+ return list.type() == QQmlListAccessor::Instance
+ || list.type() == QQmlListAccessor::ListProperty
+ || list.type() == QQmlListAccessor::ObjectList;
+ }
inline bool notify(
const QList<QQmlDelegateModelItem *> &items,