summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels/qabstractitemmodel.cpp
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2020-06-05 21:44:10 +0200
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2020-06-07 19:02:47 +0200
commite0fc998e87dcf4acfb06cc5ff840498e4cbc3f6b (patch)
tree85d24a318fefbf31a20e16b0621eda7f659499db /src/corelib/itemmodels/qabstractitemmodel.cpp
parent50ccd35fbdc1bd890f577616ee306573999cddb5 (diff)
ItemModels: remove deprecated functions
Change-Id: Id3430493a62b11977f64e146f7668ca30935b959 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/corelib/itemmodels/qabstractitemmodel.cpp')
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.cpp91
1 files changed, 1 insertions, 90 deletions
diff --git a/src/corelib/itemmodels/qabstractitemmodel.cpp b/src/corelib/itemmodels/qabstractitemmodel.cpp
index 95bfb109eb..5c6cc7b587 100644
--- a/src/corelib/itemmodels/qabstractitemmodel.cpp
+++ b/src/corelib/itemmodels/qabstractitemmodel.cpp
@@ -410,26 +410,6 @@ QModelIndex QPersistentModelIndex::sibling(int row, int column) const
return QModelIndex();
}
-#if QT_DEPRECATED_SINCE(5, 8)
-/*!
- \obsolete
-
- Use QAbstractItemModel::index() instead.
-
- Returns the child of the model index that is stored in the given \a row
- and \a column.
-
- \sa parent(), sibling()
-*/
-
-QModelIndex QPersistentModelIndex::child(int row, int column) const
-{
- if (d)
- return d->index.model()->index(row, column, d->index);
- return QModelIndex();
-}
-#endif
-
/*!
Returns the data for the given \a role for the item referred to by the
index.
@@ -517,8 +497,7 @@ Q_GLOBAL_STATIC(QEmptyItemModel, qEmptyModel)
QAbstractItemModelPrivate::QAbstractItemModelPrivate()
- : QObjectPrivate(),
- supportedDragActions(-1)
+ : QObjectPrivate()
{
}
@@ -1149,22 +1128,6 @@ void QAbstractItemModel::resetInternalData()
*/
/*!
- \fn QModelIndex QModelIndex::child(int row, int column) const
-
- \obsolete
-
- Use QAbstractItemModel::index() instead.
-
- Returns the child of the model index that is stored in the given \a row and
- \a column.
-
- \note This function does not work for an invalid model index which is often
- used as the root index.
-
- \sa parent(), sibling()
-*/
-
-/*!
\fn QVariant QModelIndex::data(int role) const
Returns the data for the given \a role for the item referred to by the
@@ -1885,7 +1848,6 @@ bool QAbstractItemModel::setData(const QModelIndex &index, const QVariant &value
return false;
}
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
/*!
\since 6.0
Removes the data stored in all the roles for the given \a index.
@@ -1900,7 +1862,6 @@ bool QAbstractItemModel::clearItemData(const QModelIndex &index)
Q_UNUSED(index);
return false;
}
-#endif
/*!
\fn QVariant QAbstractItemModel::data(const QModelIndex &index, int role) const = 0
@@ -2107,34 +2068,10 @@ Qt::DropActions QAbstractItemModel::supportedDropActions() const
*/
Qt::DropActions QAbstractItemModel::supportedDragActions() const
{
- Q_D(const QAbstractItemModel);
- if (int(d->supportedDragActions) != -1)
- return d->supportedDragActions;
return supportedDropActions();
}
/*!
- \internal
- */
-void QAbstractItemModel::doSetSupportedDragActions(Qt::DropActions actions)
-{
- Q_D(QAbstractItemModel);
- d->supportedDragActions = actions;
-}
-
-/*!
- \since 4.2
- \obsolete
- \fn void QAbstractItemModel::setSupportedDragActions(Qt::DropActions actions)
-
- This function is obsolete. Reimplement supportedDragActions() instead.
-
- Sets the supported drag \a actions for the items in the model.
-
- \sa supportedDragActions(), {Using drag and drop with item views}
-*/
-
-/*!
\note The base class implementation of this function does nothing and
returns \c{false}.
@@ -3233,28 +3170,6 @@ void QAbstractItemModel::endMoveColumns()
}
/*!
- \fn void QAbstractItemModel::reset()
- \obsolete
-
- Resets the model to its original state in any attached views.
-
- This function emits the signals modelAboutToBeReset() and modelReset().
-
- \note Use beginResetModel() and endResetModel() instead whenever possible.
- Use this method only if there is no way to call beginResetModel() before invalidating the model.
- Otherwise it could lead to unexpected behaviour, especially when used with proxy models.
-
- For example, in this code both signals modelAboutToBeReset() and modelReset()
- are emitted \e after the data changes:
-
- \snippet code/src_corelib_kernel_qabstractitemmodel.cpp 10
-
- Instead you should use:
-
- \snippet code/src_corelib_kernel_qabstractitemmodel.cpp 11
-*/
-
-/*!
Begins a model reset operation.
A reset operation resets the model to its current state in any attached views.
@@ -3297,11 +3212,7 @@ void QAbstractItemModel::endResetModel()
{
Q_D(QAbstractItemModel);
d->invalidatePersistentIndexes();
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
resetInternalData();
-#else
- QMetaObject::invokeMethod(this, "resetInternalData");
-#endif
emit modelReset(QPrivateSignal());
}