aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVenugopal Shivashankar <Venugopal.Shivashankar@qt.io>2018-09-19 10:40:31 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2018-09-25 03:58:31 +0000
commit1eedaf8e7088aee99aff746dae6fea34904e03c3 (patch)
tree8d8f8ff6ea92853cceef894c5440e3283cbe3a1b
parent92b2a4f58db9d9ba2ba7428ff017521114c6371e (diff)
Doc: Remove documentation for deprecated QML types
VisualDataModel, VisualDataGroup, and VisualItemModel are replaced with DelegateModel, DelegateModelGroup, and ObjectModel respectively (since 7cad0e52c5a020bd29635e9912fd8946a6b48124). Also renamed/deleted a few snippet files and an image. Task-number: QTBUG-37725 Change-Id: I5fa93993a31d8f9b08e7a282d5550ddd9bfb813f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
-rw-r--r--src/qml/doc/images/objectmodel.png (renamed from src/qml/doc/images/visualitemmodel.png)bin347 -> 347 bytes
-rw-r--r--src/qml/doc/snippets/delegatemodel/delegatemodel.qml (renamed from src/qml/doc/snippets/delegatemodel/visualdatamodel.qml)0
-rw-r--r--src/qml/doc/snippets/delegatemodel/delegatemodel_rootindex/main.cpp (renamed from src/qml/doc/snippets/delegatemodel/visualdatamodel_rootindex/main.cpp)0
-rw-r--r--src/qml/doc/snippets/delegatemodel/delegatemodel_rootindex/view.qml (renamed from src/qml/doc/snippets/delegatemodel/visualdatamodel_rootindex/view.qml)0
-rw-r--r--src/qml/doc/snippets/delegatemodel/delegatemodelgroup.qml (renamed from src/qml/doc/snippets/delegatemodel/visualdatagroup.qml)0
-rw-r--r--src/qml/types/qqmldelegatemodel.cpp58
-rw-r--r--src/qml/types/qqmlobjectmodel.cpp19
-rw-r--r--src/qml/util/qqmllistcompositor.cpp2
-rw-r--r--src/quick/doc/snippets/qml/models/visual-model-and-view.qml68
-rw-r--r--src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc5
-rw-r--r--src/quick/items/qquickgridview.cpp11
-rw-r--r--src/quick/items/qquicklistview.cpp2
12 files changed, 19 insertions, 146 deletions
diff --git a/src/qml/doc/images/visualitemmodel.png b/src/qml/doc/images/objectmodel.png
index 5e6d1325b2..5e6d1325b2 100644
--- a/src/qml/doc/images/visualitemmodel.png
+++ b/src/qml/doc/images/objectmodel.png
Binary files differ
diff --git a/src/qml/doc/snippets/delegatemodel/visualdatamodel.qml b/src/qml/doc/snippets/delegatemodel/delegatemodel.qml
index 1a7baa6b1e..1a7baa6b1e 100644
--- a/src/qml/doc/snippets/delegatemodel/visualdatamodel.qml
+++ b/src/qml/doc/snippets/delegatemodel/delegatemodel.qml
diff --git a/src/qml/doc/snippets/delegatemodel/visualdatamodel_rootindex/main.cpp b/src/qml/doc/snippets/delegatemodel/delegatemodel_rootindex/main.cpp
index a56eb69616..a56eb69616 100644
--- a/src/qml/doc/snippets/delegatemodel/visualdatamodel_rootindex/main.cpp
+++ b/src/qml/doc/snippets/delegatemodel/delegatemodel_rootindex/main.cpp
diff --git a/src/qml/doc/snippets/delegatemodel/visualdatamodel_rootindex/view.qml b/src/qml/doc/snippets/delegatemodel/delegatemodel_rootindex/view.qml
index 2e17eed8f0..2e17eed8f0 100644
--- a/src/qml/doc/snippets/delegatemodel/visualdatamodel_rootindex/view.qml
+++ b/src/qml/doc/snippets/delegatemodel/delegatemodel_rootindex/view.qml
diff --git a/src/qml/doc/snippets/delegatemodel/visualdatagroup.qml b/src/qml/doc/snippets/delegatemodel/delegatemodelgroup.qml
index 8562deeeda..8562deeeda 100644
--- a/src/qml/doc/snippets/delegatemodel/visualdatagroup.qml
+++ b/src/qml/doc/snippets/delegatemodel/delegatemodelgroup.qml
diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp
index 4f7f92aca8..2b9a45c142 100644
--- a/src/qml/types/qqmldelegatemodel.cpp
+++ b/src/qml/types/qqmldelegatemodel.cpp
@@ -161,22 +161,6 @@ QQmlDelegateModelParts::QQmlDelegateModelParts(QQmlDelegateModel *parent)
//---------------------------------------------------------------------------
/*!
- \qmltype VisualDataModel
- \instantiates QQmlDelegateModel
- \inqmlmodule QtQuick
- \ingroup qtquick-models
- \brief Encapsulates a model and delegate.
-
- The VisualDataModel type encapsulates a model and the delegate that will
- be instantiated for items in a model.
-
- This type is provided by the \l{Qt QML} module due to compatibility reasons.
- The same implementation is now primarily available as DelegateModel in the
- \l{Qt QML Models QML Types}{Qt QML Models} module.
-
- \sa {QtQml.Models::DelegateModel}
-*/
-/*!
\qmltype DelegateModel
\instantiates QQmlDelegateModel
\inqmlmodule QtQml.Models
@@ -194,10 +178,7 @@ QQmlDelegateModelParts::QQmlDelegateModelParts(QQmlDelegateModel *parent)
The example below illustrates using a DelegateModel with a ListView.
- \snippet delegatemodel/visualdatamodel.qml 0
-
- \note This type is also available as \l VisualDataModel in the \l{Qt QML}
- module due to compatibility reasons.
+ \snippet delegatemodel/delegatemodel.qml 0
*/
QQmlDelegateModelPrivate::QQmlDelegateModelPrivate(QQmlContext *ctxt)
@@ -509,10 +490,10 @@ void QQmlDelegateModel::setDelegate(QQmlComponent *delegate)
the new directory's contents.
\c main.cpp:
- \snippet delegatemodel/visualdatamodel_rootindex/main.cpp 0
+ \snippet delegatemodel/delegatemodel_rootindex/main.cpp 0
\c view.qml:
- \snippet delegatemodel/visualdatamodel_rootindex/view.qml 0
+ \snippet delegatemodel/delegatemodel_rootindex/view.qml 0
If the \l model is a QAbstractItemModel subclass, the delegate can also
reference a \c hasModelChildren property (optionally qualified by a
@@ -719,7 +700,7 @@ QQmlDelegateModelGroup *QQmlDelegateModelPrivate::group_at(
The following example illustrates using groups to select items in a model.
- \snippet delegatemodel/visualdatagroup.qml 0
+ \snippet delegatemodel/delegatemodelgroup.qml 0
*/
QQmlListProperty<QQmlDelegateModelGroup> QQmlDelegateModel::groups()
@@ -737,7 +718,7 @@ QQmlListProperty<QQmlDelegateModelGroup> QQmlDelegateModel::groups()
/*!
\qmlproperty DelegateModelGroup QtQml.Models::DelegateModel::items
- This property holds visual data model's default group to which all new items are added.
+ This property holds default group to which all new items are added.
*/
QQmlDelegateModelGroup *QQmlDelegateModel::items()
@@ -749,7 +730,7 @@ QQmlDelegateModelGroup *QQmlDelegateModel::items()
/*!
\qmlproperty DelegateModelGroup QtQml.Models::DelegateModel::persistedItems
- This property holds visual data model's persisted items group.
+ This property holds delegate model's persisted items group.
Items in this group are not destroyed when released by a view, instead they are persisted
until removed from the group.
@@ -772,9 +753,9 @@ QQmlDelegateModelGroup *QQmlDelegateModel::persistedItems()
/*!
\qmlproperty string QtQml.Models::DelegateModel::filterOnGroup
- This property holds the name of the group used to filter the visual data model.
+ This property holds name of the group that is used to filter the delegate model.
- Only items which belong to this group are visible to a view.
+ Only items that belong to this group are visible to a view.
By default this is the \l items group.
*/
@@ -2265,7 +2246,7 @@ void QQmlDelegateModelAttached::resetCurrentIndex()
/*!
\qmlattachedproperty int QtQml.Models::DelegateModel::model
- This attached property holds the visual data model this delegate instance belongs to.
+ This attached property holds the data model this delegate instance belongs to.
It is attached to each instance of the delegate.
*/
@@ -2312,7 +2293,7 @@ void QQmlDelegateModelAttached::setGroups(const QStringList &groups)
/*!
\qmlattachedproperty bool QtQml.Models::DelegateModel::isUnresolved
- This attached property holds whether the visual item is bound to a data model index.
+ This attached property indicates whether the visual item is bound to a data model index.
Returns true if the item is not bound to the model, and false if it is.
An unresolved item can be bound to the data model using the DelegateModelGroup::resolve()
@@ -2451,22 +2432,6 @@ void QQmlDelegateModelGroupPrivate::destroyingPackage(QQuickPackage *package)
}
/*!
- \qmltype VisualDataGroup
- \instantiates QQmlDelegateModelGroup
- \inqmlmodule QtQuick
- \ingroup qtquick-models
- \brief Encapsulates a filtered set of visual data items.
-
- The VisualDataGroup type provides a means to address the model data of a
- model's delegate items, as well as sort and filter these delegate items.
-
- This type is provided by the \l{Qt QML} module due to compatibility reasons.
- The same implementation is now primarily available as \l DelegateModelGroup
- in the \l{Qt QML Models QML Types}{Qt QML Models} module.
-
- \sa {QtQml.Models::DelegateModelGroup}
-*/
-/*!
\qmltype DelegateModelGroup
\instantiates QQmlDelegateModelGroup
\inqmlmodule QtQml.Models
@@ -2499,9 +2464,6 @@ void QQmlDelegateModelGroupPrivate::destroyingPackage(QQuickPackage *package)
type or to cherry-pick specific items that should be instantiated irregardless of whether
they're currently within a view's visible area.
- \note This type is also available as \l VisualDataGroup in the \l{Qt QML}
- module due to compatibility reasons.
-
\sa {QML Dynamic View Ordering Tutorial}
*/
QQmlDelegateModelGroup::QQmlDelegateModelGroup(QObject *parent)
diff --git a/src/qml/types/qqmlobjectmodel.cpp b/src/qml/types/qqmlobjectmodel.cpp
index d94af64fde..2f4d427430 100644
--- a/src/qml/types/qqmlobjectmodel.cpp
+++ b/src/qml/types/qqmlobjectmodel.cpp
@@ -206,27 +206,10 @@ public:
}
\endcode
- \image visualitemmodel.png
+ \image objectmodel.png
\sa {Qt Quick Examples - Views}
*/
-/*!
- \qmltype VisualItemModel
- \instantiates QQmlObjectModel
- \inqmlmodule QtQuick
- \brief Defines a set of objects to be used as a model.
-
- The VisualItemModel type contains the objects to be used
- as a model.
-
- This element is now primarily available as ObjectModel in the QtQml.Models module.
- VisualItemModel continues to be provided, with the same implementation, in \c QtQuick for
- compatibility reasons.
-
- For full details about the type, see the \l ObjectModel documentation.
-
- \sa {QtQml.Models::ObjectModel}
-*/
QQmlObjectModel::QQmlObjectModel(QObject *parent)
: QQmlInstanceModel(*(new QQmlObjectModelPrivate), parent)
diff --git a/src/qml/util/qqmllistcompositor.cpp b/src/qml/util/qqmllistcompositor.cpp
index 8b0b8f48f0..921e86f355 100644
--- a/src/qml/util/qqmllistcompositor.cpp
+++ b/src/qml/util/qqmllistcompositor.cpp
@@ -99,7 +99,7 @@ QT_BEGIN_NAMESPACE
ranges is often quite small, which helps as well. If there is a need for faster random access
then a skip list like index may be an appropriate addition.
- \sa VisualDataModel
+ \sa DelegateModel
*/
#ifdef QT_QML_VERIFY_MINIMAL
diff --git a/src/quick/doc/snippets/qml/models/visual-model-and-view.qml b/src/quick/doc/snippets/qml/models/visual-model-and-view.qml
deleted file mode 100644
index baf489f8b9..0000000000
--- a/src/quick/doc/snippets/qml/models/visual-model-and-view.qml
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.0
-
-Rectangle {
- width: 200; height: 200
-
- //! [visual model and view]
- VisualItemModel {
- id: itemModel
- Rectangle { height: 30; width: 80; color: "red" }
- Rectangle { height: 30; width: 80; color: "green" }
- Rectangle { height: 30; width: 80; color: "blue" }
- }
-
- ListView {
- anchors.fill: parent
- model: itemModel
- }
- //! [visual model and view]
-}
diff --git a/src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc b/src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc
index c2a0450daf..89b7929755 100644
--- a/src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc
+++ b/src/quick/doc/src/concepts/modelviewsdata/modelview.qdoc
@@ -278,11 +278,6 @@ To visualize data, bind the view's \c model property to a model and the
}
\endcode
- \note VisualItemModel can also be used, but it is only provided for compatibility
- reasons. VisualItemModel allows a QML item to be provided as a model. This model
- contains both the data and delegate; the child items of a VisualItemModel
- provide the contents of the delegate. The model does not provide any roles.
-
\section2 Integers as Models
An integer can be used as a model that contains a certain number
diff --git a/src/quick/items/qquickgridview.cpp b/src/quick/items/qquickgridview.cpp
index 6fcd846423..d7b3b0708c 100644
--- a/src/quick/items/qquickgridview.cpp
+++ b/src/quick/items/qquickgridview.cpp
@@ -1309,13 +1309,14 @@ void QQuickGridView::setHighlightFollowsCurrentItem(bool autoHighlight)
/*!
- \qmlproperty model QtQuick::GridView::model
- This property holds the model providing data for the grid.
+ \qmlproperty model QtQuick::GridView::model
+ This property holds the model providing data for the grid.
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 C++ model classes. If a C++ model class is
- used, it must be a subclass of \l QAbstractItemModel or a simple list.
+ in the view. Models can be created directly in QML using \l ListModel,
+ \l XmlListModel, \l DelegateModel, or \l ObjectModel, or provided by C++
+ model classes. If a C++ model class is used, it must be a subclass of
+ \l QAbstractItemModel or a simple list.
\sa {qml-data-models}{Data Models}
*/
diff --git a/src/quick/items/qquicklistview.cpp b/src/quick/items/qquicklistview.cpp
index 4b4657dc43..540805ac28 100644
--- a/src/quick/items/qquicklistview.cpp
+++ b/src/quick/items/qquicklistview.cpp
@@ -1982,7 +1982,7 @@ QQuickListView::~QQuickListView()
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 C++ model classes. If a C++ model class is
+ or \l ObjectModel, or provided by C++ model classes. If a C++ model class is
used, it must be a subclass of \l QAbstractItemModel or a simple list.
\sa {qml-data-models}{Data Models}