QSortFilterProxyModel: annotate some deprecated functions as deprecated
QSortFilterProxyModel::clear() and filterChanged() are deprecated since Qt4.3 but not annotated with QT_DEPRECATED. Change-Id: Ia468203802b6be0596f0a48d51f1da3fa55b724b Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>bb10
parent
6df308c0d7
commit
ec7e870e70
|
|
@ -2685,6 +2685,7 @@ void QSortFilterProxyModel::setRecursiveFilteringEnabled(bool recursive)
|
|||
d->filter_changed();
|
||||
}
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 11)
|
||||
/*!
|
||||
\obsolete
|
||||
|
||||
|
|
@ -2692,12 +2693,9 @@ void QSortFilterProxyModel::setRecursiveFilteringEnabled(bool recursive)
|
|||
*/
|
||||
void QSortFilterProxyModel::clear()
|
||||
{
|
||||
Q_D(QSortFilterProxyModel);
|
||||
emit layoutAboutToBeChanged();
|
||||
d->_q_clearMapping();
|
||||
emit layoutChanged();
|
||||
invalidate();
|
||||
}
|
||||
|
||||
#endif
|
||||
/*!
|
||||
\since 4.3
|
||||
|
||||
|
|
@ -2713,6 +2711,7 @@ void QSortFilterProxyModel::invalidate()
|
|||
emit layoutChanged();
|
||||
}
|
||||
|
||||
#if QT_DEPRECATED_SINCE(5, 11)
|
||||
/*!
|
||||
\obsolete
|
||||
|
||||
|
|
@ -2720,9 +2719,9 @@ void QSortFilterProxyModel::invalidate()
|
|||
*/
|
||||
void QSortFilterProxyModel::filterChanged()
|
||||
{
|
||||
Q_D(QSortFilterProxyModel);
|
||||
d->filter_changed();
|
||||
invalidateFilter();
|
||||
}
|
||||
#endif
|
||||
|
||||
/*!
|
||||
\since 4.3
|
||||
|
|
|
|||
|
|
@ -115,7 +115,9 @@ public Q_SLOTS:
|
|||
void setFilterRegExp(const QString &pattern);
|
||||
void setFilterWildcard(const QString &pattern);
|
||||
void setFilterFixedString(const QString &pattern);
|
||||
void clear();
|
||||
#if QT_DEPRECATED_SINCE(5, 11)
|
||||
QT_DEPRECATED_X("Use QSortFilterProxyModel::invalidate") void clear();
|
||||
#endif
|
||||
void invalidate();
|
||||
|
||||
protected:
|
||||
|
|
@ -123,7 +125,9 @@ protected:
|
|||
virtual bool filterAcceptsColumn(int source_column, const QModelIndex &source_parent) const;
|
||||
virtual bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const;
|
||||
|
||||
void filterChanged();
|
||||
#if QT_DEPRECATED_SINCE(5, 11)
|
||||
QT_DEPRECATED_X("Use QSortFilterProxyModel::invalidateFilter") void filterChanged();
|
||||
#endif
|
||||
void invalidateFilter();
|
||||
|
||||
public:
|
||||
|
|
|
|||
Loading…
Reference in New Issue