diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-03-21 20:42:38 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2019-03-21 20:42:47 +0100 |
commit | 6767114285db9d0e16dc278d08f231e8561546b4 (patch) | |
tree | 0945902a2242fd7ec0a1f7fd3e6acbb769e723bd /src/qml/types/qqmlobjectmodel_p.h | |
parent | ee076afedccbe1d37306a7972051f84eb036d655 (diff) | |
parent | c32b109e9dea44c6775c2dbf8f164870c1dc8971 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/scenegraphng
Change-Id: Ib5662d80d5b2f58cf4634c54c054545ba9df807e
Diffstat (limited to 'src/qml/types/qqmlobjectmodel_p.h')
-rw-r--r-- | src/qml/types/qqmlobjectmodel_p.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/qml/types/qqmlobjectmodel_p.h b/src/qml/types/qqmlobjectmodel_p.h index fc4c03874f..4ac4f1c65b 100644 --- a/src/qml/types/qqmlobjectmodel_p.h +++ b/src/qml/types/qqmlobjectmodel_p.h @@ -52,6 +52,7 @@ // #include <private/qtqmlglobal_p.h> +#include <private/qqmlincubator_p.h> #include <QtQml/qqml.h> #include <QtCore/qobject.h> @@ -59,6 +60,7 @@ QT_BEGIN_NAMESPACE class QObject; class QQmlChangeSet; +class QAbstractItemModel; class Q_QML_PRIVATE_EXPORT QQmlInstanceModel : public QObject { @@ -74,13 +76,15 @@ public: virtual int count() const = 0; virtual bool isValid() const = 0; - virtual QObject *object(int index, bool asynchronous=false) = 0; + virtual QObject *object(int index, QQmlIncubator::IncubationMode incubationMode = QQmlIncubator::AsynchronousIfNested) = 0; virtual ReleaseFlags release(QObject *object) = 0; virtual void cancel(int) {} virtual QString stringValue(int, const QString &) = 0; virtual void setWatchedRoles(const QList<QByteArray> &roles) = 0; + virtual QQmlIncubator::Status incubationStatus(int index) = 0; virtual int indexOf(QObject *object, QObject *objectContext) const = 0; + virtual const QAbstractItemModel *abstractItemModel() const { return nullptr; } Q_SIGNALS: void countChanged(); @@ -90,7 +94,7 @@ Q_SIGNALS: void destroyingItem(QObject *object); protected: - QQmlInstanceModel(QObjectPrivate &dd, QObject *parent = 0) + QQmlInstanceModel(QObjectPrivate &dd, QObject *parent = nullptr) : QObject(dd, parent) {} private: @@ -108,15 +112,16 @@ class Q_QML_PRIVATE_EXPORT QQmlObjectModel : public QQmlInstanceModel Q_CLASSINFO("DefaultProperty", "children") public: - QQmlObjectModel(QObject *parent=0); + QQmlObjectModel(QObject *parent=nullptr); ~QQmlObjectModel() {} int count() const override; bool isValid() const override; - QObject *object(int index, bool asynchronous = false) override; + QObject *object(int index, QQmlIncubator::IncubationMode incubationMode = QQmlIncubator::AsynchronousIfNested) override; ReleaseFlags release(QObject *object) override; QString stringValue(int index, const QString &role) override; void setWatchedRoles(const QList<QByteArray> &) override {} + QQmlIncubator::Status incubationStatus(int index) override; int indexOf(QObject *object, QObject *objectContext) const override; |