aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlmodels/qqmladaptormodel_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmlmodels/qqmladaptormodel_p.h')
-rw-r--r--src/qmlmodels/qqmladaptormodel_p.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/qmlmodels/qqmladaptormodel_p.h b/src/qmlmodels/qqmladaptormodel_p.h
index a4549127af..2c90ffc1d1 100644
--- a/src/qmlmodels/qqmladaptormodel_p.h
+++ b/src/qmlmodels/qqmladaptormodel_p.h
@@ -87,7 +87,7 @@ public:
virtual QQmlDelegateModelItem *createItem(
QQmlAdaptorModel &,
- QQmlDelegateModelItemMetaType *,
+ const QQmlRefPointer<QQmlDelegateModelItemMetaType> &,
int, int, int) const { return nullptr; }
virtual bool notify(
@@ -115,7 +115,7 @@ public:
QPersistentModelIndex rootIndex;
QQmlListAccessor list;
- int modelItemRevision = 0;
+ QTypeRevision modelItemRevision = QTypeRevision::zero();
QQmlAdaptorModel();
~QQmlAdaptorModel();
@@ -132,7 +132,7 @@ public:
int columnAt(int index) const;
int indexAt(int row, int column) const;
- void useImportVersion(int minorVersion);
+ void useImportVersion(QTypeRevision revision);
inline bool adaptsAim() const { return qobject_cast<QAbstractItemModel *>(object()); }
inline QAbstractItemModel *aim() { return static_cast<QAbstractItemModel *>(object()); }
@@ -140,10 +140,16 @@ public:
inline QVariant value(int index, const QString &role) const {
return accessors->value(*this, index, role); }
- inline QQmlDelegateModelItem *createItem(QQmlDelegateModelItemMetaType *metaType, int index) {
- return accessors->createItem(*this, metaType, index, rowAt(index), columnAt(index)); }
+ inline QQmlDelegateModelItem *createItem(
+ const QQmlRefPointer<QQmlDelegateModelItemMetaType> &metaType, int index)
+ {
+ 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,