diff options
Diffstat (limited to 'src/qml/util/qqmladaptormodel.cpp')
-rw-r--r-- | src/qml/util/qqmladaptormodel.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/qml/util/qqmladaptormodel.cpp b/src/qml/util/qqmladaptormodel.cpp index 927f740935..11fed281b7 100644 --- a/src/qml/util/qqmladaptormodel.cpp +++ b/src/qml/util/qqmladaptormodel.cpp @@ -102,8 +102,8 @@ public: virtual QVariant value(int role) const = 0; virtual void setValue(int role, const QVariant &value) = 0; - void setValue(const QString &role, const QVariant &value); - bool resolveIndex(const QQmlAdaptorModel &model, int idx); + void setValue(const QString &role, const QVariant &value) override; + bool resolveIndex(const QQmlAdaptorModel &model, int idx) override; static QV4::ReturnedValue get_property(QV4::CallContext *ctx, uint propertyId); static QV4::ReturnedValue set_property(QV4::CallContext *ctx, uint propertyId); @@ -140,7 +140,7 @@ public: const QList<QQmlDelegateModelItem *> &items, int index, int count, - const QVector<int> &roles) const + const QVector<int> &roles) const override { bool changed = roles.isEmpty() && !watchedRoles.isEmpty(); if (!changed && !watchedRoles.isEmpty() && watchedRoleIds.isEmpty()) { @@ -184,7 +184,7 @@ public: void replaceWatchedRoles( QQmlAdaptorModel &, const QList<QByteArray> &oldRoles, - const QList<QByteArray> &newRoles) const + const QList<QByteArray> &newRoles) const override { VDMModelDelegateDataType *dataType = const_cast<VDMModelDelegateDataType *>(this); @@ -237,12 +237,12 @@ public: // QAbstractDynamicMetaObject - void objectDestroyed(QObject *) + void objectDestroyed(QObject *) override { release(); } - int metaCall(QObject *object, QMetaObject::Call call, int id, void **arguments) + int metaCall(QObject *object, QMetaObject::Call call, int id, void **arguments) override { return static_cast<QQmlDMCachedModelData *>(object)->metaCall(call, id, arguments); } @@ -413,18 +413,18 @@ public: } } - QVariant value(int role) const + QVariant value(int role) const override { return type->model->aim()->index(index, 0, type->model->rootIndex).data(role); } - void setValue(int role, const QVariant &value) + void setValue(int role, const QVariant &value) override { type->model->aim()->setData( type->model->aim()->index(index, 0, type->model->rootIndex), value, role); } - QV4::ReturnedValue get() + QV4::ReturnedValue get() override { if (type->prototype.isUndefined()) { QQmlAdaptorModelEngineData * const data = engineData(v4); @@ -515,7 +515,7 @@ public: QQmlDelegateModelItem *createItem( QQmlAdaptorModel &model, QQmlDelegateModelItemMetaType *metaType, - int index) const Q_DECL_OVERRIDE + int index) const override { VDMAbstractItemModelDataType *dataType = const_cast<VDMAbstractItemModelDataType *>(this); if (!metaObject) @@ -601,7 +601,7 @@ public: RETURN_RESULT(QV4::Encode::undefined()); } - QV4::ReturnedValue get() + QV4::ReturnedValue get() override { QQmlAdaptorModelEngineData *data = engineData(v4); QV4::Scope scope(v4); @@ -612,13 +612,13 @@ public: return o.asReturnedValue(); } - void setValue(const QString &role, const QVariant &value) + void setValue(const QString &role, const QVariant &value) override { if (role == QLatin1String("modelData")) cachedData = value; } - bool resolveIndex(const QQmlAdaptorModel &model, int idx) + bool resolveIndex(const QQmlAdaptorModel &model, int idx) override { if (index == -1) { index = idx; @@ -660,7 +660,7 @@ public: QQmlDelegateModelItem *createItem( QQmlAdaptorModel &model, QQmlDelegateModelItemMetaType *metaType, - int index) const Q_DECL_OVERRIDE + int index) const override { return new QQmlDMListAccessorData( metaType, @@ -687,7 +687,7 @@ public: QObject *object); QObject *modelData() const { return object; } - QObject *proxiedObject() { return object; } + QObject *proxiedObject() override { return object; } QPointer<QObject> object; }; @@ -744,7 +744,7 @@ public: QQmlDelegateModelItem *createItem( QQmlAdaptorModel &model, QQmlDelegateModelItemMetaType *metaType, - int index) const Q_DECL_OVERRIDE + int index) const override { VDMObjectDelegateDataType *dataType = const_cast<VDMObjectDelegateDataType *>(this); if (!metaObject) @@ -785,7 +785,7 @@ public: m_type->release(); } - int metaCall(QObject *o, QMetaObject::Call call, int id, void **arguments) + int metaCall(QObject *o, QMetaObject::Call call, int id, void **arguments) override { Q_ASSERT(o == m_data); Q_UNUSED(o); @@ -806,7 +806,7 @@ public: } } - int createProperty(const char *name, const char *) + int createProperty(const char *name, const char *) override { if (!m_data->object) return -1; |