From 347a29ff5cc2bde63863cf8657c64b4d13f52406 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Wed, 3 Oct 2018 08:47:04 +0200 Subject: Replace more vestiges of VisualDataModel, *Group and VisualItemModel VisualDataModel, VisualDataGroup, and VisualItemModel are replaced with DelegateModel, DelegateModelGroup, and ObjectModel respectively (since 7cad0e52c5a020bd29635e9912fd8946a6b48124), so shouldn't be mentioned anymore, in preparation for removal. Task-number: QTBUG-37725 Change-Id: I9a01ec8db748f817efca638383b7a278c7b562cd Reviewed-by: Mitch Curtis Reviewed-by: Venugopal Shivashankar --- src/particles/qquickitemparticle_p.h | 1 - src/qml/types/qqmldelegatemodel.cpp | 8 ++++---- src/qml/util/qqmladaptormodel.cpp | 14 +++++++------- src/quick/items/qquicktableview.cpp | 2 +- 4 files changed, 12 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/particles/qquickitemparticle_p.h b/src/particles/qquickitemparticle_p.h index 9e6c7deaea..7867add4e4 100644 --- a/src/particles/qquickitemparticle_p.h +++ b/src/particles/qquickitemparticle_p.h @@ -56,7 +56,6 @@ #include QT_BEGIN_NAMESPACE -class QQuickVisualDataModel; class QQuickItemParticleAttached; class QQuickItemParticle : public QQuickParticlePainter diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp index f6bf4a6647..243a7ce749 100644 --- a/src/qml/types/qqmldelegatemodel.cpp +++ b/src/qml/types/qqmldelegatemodel.cpp @@ -103,7 +103,7 @@ struct DelegateModelGroupFunction : QV4::FunctionObject QV4::Scoped f(scope, static_cast(that)); QV4::Scoped o(scope, thisObject); if (!o) - return scope.engine->throwTypeError(QStringLiteral("Not a valid VisualData object")); + return scope.engine->throwTypeError(QStringLiteral("Not a valid DelegateModel object")); QV4::ScopedValue v(scope, argc ? argv[0] : Value::undefinedValue()); return f->d()->code(o->d()->item, f->d()->flag, v); @@ -1936,7 +1936,7 @@ QV4::ReturnedValue QQmlDelegateModelItem::get_model(const QV4::FunctionObject *b QV4::Scope scope(b); QV4::Scoped o(scope, thisObject->as()); if (!o) - return b->engine()->throwTypeError(QStringLiteral("Not a valid VisualData object")); + return b->engine()->throwTypeError(QStringLiteral("Not a valid DelegateModel object")); if (!o->d()->item->metaType->model) RETURN_UNDEFINED(); @@ -1948,7 +1948,7 @@ QV4::ReturnedValue QQmlDelegateModelItem::get_groups(const QV4::FunctionObject * QV4::Scope scope(b); QV4::Scoped o(scope, thisObject->as()); if (!o) - return scope.engine->throwTypeError(QStringLiteral("Not a valid VisualData object")); + return scope.engine->throwTypeError(QStringLiteral("Not a valid DelegateModel object")); QStringList groups; for (int i = 1; i < o->d()->item->metaType->groupCount; ++i) { @@ -1964,7 +1964,7 @@ QV4::ReturnedValue QQmlDelegateModelItem::set_groups(const QV4::FunctionObject * QV4::Scope scope(b); QV4::Scoped o(scope, thisObject->as()); if (!o) - return scope.engine->throwTypeError(QStringLiteral("Not a valid VisualData object")); + return scope.engine->throwTypeError(QStringLiteral("Not a valid DelegateModel object")); if (!argc) THROW_TYPE_ERROR(); diff --git a/src/qml/util/qqmladaptormodel.cpp b/src/qml/util/qqmladaptormodel.cpp index b5caaba727..2b50a0867c 100644 --- a/src/qml/util/qqmladaptormodel.cpp +++ b/src/qml/util/qqmladaptormodel.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2018 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtQml module of the Qt Toolkit. @@ -66,7 +66,7 @@ static QV4::ReturnedValue get_index(const QV4::FunctionObject *f, const QV4::Val QV4::Scope scope(f); QV4::Scoped o(scope, thisObject->as()); if (!o) - RETURN_RESULT(scope.engine->throwTypeError(QStringLiteral("Not a valid VisualData object"))); + RETURN_RESULT(scope.engine->throwTypeError(QStringLiteral("Not a valid DelegateModel object"))); RETURN_RESULT(QV4::Encode(o->d()->item->index)); } @@ -200,7 +200,7 @@ public: QV4::Scope scope(b); QV4::Scoped o(scope, thisObject->as()); if (!o) - RETURN_RESULT(scope.engine->throwTypeError(QStringLiteral("Not a valid VisualData object"))); + RETURN_RESULT(scope.engine->throwTypeError(QStringLiteral("Not a valid DelegateModel object"))); const QQmlAdaptorModel *const model = static_cast(o->d()->item)->type->model; if (o->d()->item->index >= 0 && *model) { @@ -346,7 +346,7 @@ QV4::ReturnedValue QQmlDMCachedModelData::get_property(const QV4::FunctionObject QV4::Scope scope(b); QV4::Scoped o(scope, thisObject->as()); if (!o) - return scope.engine->throwTypeError(QStringLiteral("Not a valid VisualData object")); + return scope.engine->throwTypeError(QStringLiteral("Not a valid DelegateModel object")); uint propertyId = static_cast(b)->d()->index; @@ -368,7 +368,7 @@ QV4::ReturnedValue QQmlDMCachedModelData::set_property(const QV4::FunctionObject QV4::Scope scope(b); QV4::Scoped o(scope, thisObject->as()); if (!o) - return scope.engine->throwTypeError(QStringLiteral("Not a valid VisualData object")); + return scope.engine->throwTypeError(QStringLiteral("Not a valid DelegateModel object")); if (!argc) return scope.engine->throwTypeError(); @@ -578,7 +578,7 @@ public: QV4::ExecutionEngine *v4 = b->engine(); const QQmlDelegateModelItemObject *o = thisObject->as(); if (!o) - return v4->throwTypeError(QStringLiteral("Not a valid VisualData object")); + return v4->throwTypeError(QStringLiteral("Not a valid DelegateModel object")); return v4->fromVariant(static_cast(o->d()->item)->cachedData); } @@ -588,7 +588,7 @@ public: QV4::ExecutionEngine *v4 = b->engine(); const QQmlDelegateModelItemObject *o = thisObject->as(); if (!o) - return v4->throwTypeError(QStringLiteral("Not a valid VisualData object")); + return v4->throwTypeError(QStringLiteral("Not a valid DelegateModel object")); if (!argc) return v4->throwTypeError(); diff --git a/src/quick/items/qquicktableview.cpp b/src/quick/items/qquicktableview.cpp index 2ae006be29..68d55d98ea 100644 --- a/src/quick/items/qquicktableview.cpp +++ b/src/quick/items/qquicktableview.cpp @@ -241,7 +241,7 @@ The model provides the set of data that is used to create the items in the view. Models can be created directly in QML using \l ListModel, - \l XmlListModel or \l VisualItemModel, or provided by a custom C++ model + \l XmlListModel or \l ObjectModel, or provided by a custom C++ model class. If it is a C++ model, it must be a subclass of \l QAbstractItemModel or a simple list. -- cgit v1.2.3