aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlmodels/qqmldelegatemodel_p_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qmlmodels/qqmldelegatemodel_p_p.h')
-rw-r--r--src/qmlmodels/qqmldelegatemodel_p_p.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/qmlmodels/qqmldelegatemodel_p_p.h b/src/qmlmodels/qqmldelegatemodel_p_p.h
index a6ab5a970d..3c7ab9281d 100644
--- a/src/qmlmodels/qqmldelegatemodel_p_p.h
+++ b/src/qmlmodels/qqmldelegatemodel_p_p.h
@@ -14,6 +14,7 @@
#include <private/qqmlopenmetaobject_p.h>
#include <QtCore/qloggingcategory.h>
+#include <QtCore/qpointer.h>
//
// W A R N I N G
@@ -37,7 +38,8 @@ typedef QQmlListCompositor Compositor;
class QQmlDelegateModelAttachedMetaObject;
class QQmlAbstractDelegateComponent;
-class Q_QMLMODELS_PRIVATE_EXPORT QQmlDelegateModelItemMetaType : public QQmlRefCount
+class Q_QMLMODELS_EXPORT QQmlDelegateModelItemMetaType final
+ : public QQmlRefCounted<QQmlDelegateModelItemMetaType>
{
public:
QQmlDelegateModelItemMetaType(QV4::ExecutionEngine *engine, QQmlDelegateModel *model, const QStringList &groupNames);
@@ -231,7 +233,7 @@ public:
bool parseIndex(const QV4::Value &value, int *index, Compositor::Group *group) const;
bool parseGroupArgs(
- QQmlV4Function *args, Compositor::Group *group, int *index, int *count, int *groups) const;
+ QQmlV4FunctionPtr args, Compositor::Group *group, int *index, int *count, int *groups) const;
Compositor::Group group;
QPointer<QQmlDelegateModel> model;
@@ -301,7 +303,12 @@ public:
void emitModelUpdated(const QQmlChangeSet &changeSet, bool reset) override;
void delegateChanged(bool add = true, bool remove = true);
- bool insert(Compositor::insert_iterator &before, const QV4::Value &object, int groups);
+ enum class InsertionResult {
+ Success,
+ Error,
+ Retry
+ };
+ InsertionResult insert(Compositor::insert_iterator &before, const QV4::Value &object, int groups);
int adaptorModelCount() const;
@@ -354,7 +361,7 @@ public:
class QQmlPartsModel : public QQmlInstanceModel, public QQmlDelegateModelGroupEmitter
{
Q_OBJECT
- Q_PROPERTY(QString filterOnGroup READ filterGroup WRITE setFilterGroup NOTIFY filterGroupChanged RESET resetFilterGroup)
+ Q_PROPERTY(QString filterOnGroup READ filterGroup WRITE setFilterGroup NOTIFY filterGroupChanged RESET resetFilterGroup FINAL)
public:
QQmlPartsModel(QQmlDelegateModel *model, const QString &part, QObject *parent = nullptr);
~QQmlPartsModel();
@@ -419,7 +426,9 @@ public:
QList<QQmlPartsModel *> models;
};
-class QQmlDelegateModelAttachedMetaObject : public QAbstractDynamicMetaObject, public QQmlRefCount
+class QQmlDelegateModelAttachedMetaObject final
+ : public QAbstractDynamicMetaObject,
+ public QQmlRefCounted<QQmlDelegateModelAttachedMetaObject>
{
public:
QQmlDelegateModelAttachedMetaObject(