diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2018-10-26 20:38:58 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-11-02 05:56:58 +0000 |
commit | d0f909f8dbdd8594b0d950822f0e7ab8728da513 (patch) | |
tree | e1d3b59a5eb94559a963cd0c664d4b8498336fe3 /src/widgets/itemviews/qtableview.h | |
parent | d84a7a812818065f97e015e50f66f6dad8c9a978 (diff) |
QTreeView/TableView: explicitly mark sortByColumn(int) as deprecated
QTreeView/TableView::sortByColumn(int) was deprecated a long time ago
but never got removed. Therefore mark it with QT_DEPRECATED_SINCE(5, 13)
so we can remove it with Qt6.
Also sync the handling of the sort order changes in QTableView with the
one from QTreeView.
Change-Id: I0371d9a9c21116edaa9125835827f1a200075d36
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/widgets/itemviews/qtableview.h')
-rw-r--r-- | src/widgets/itemviews/qtableview.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/widgets/itemviews/qtableview.h b/src/widgets/itemviews/qtableview.h index 60c2f34103..3275c09f88 100644 --- a/src/widgets/itemviews/qtableview.h +++ b/src/widgets/itemviews/qtableview.h @@ -118,7 +118,6 @@ public: int columnSpan(int row, int column) const; void clearSpans(); - void sortByColumn(int column, Qt::SortOrder order); public Q_SLOTS: void selectRow(int row); @@ -131,7 +130,11 @@ public Q_SLOTS: void resizeRowsToContents(); void resizeColumnToContents(int column); void resizeColumnsToContents(); +#if QT_DEPRECATED_SINCE(5, 13) + QT_DEPRECATED_X ("Use QTableView::sortByColumn(int column, Qt::SortOrder order) instead") void sortByColumn(int column); +#endif + void sortByColumn(int column, Qt::SortOrder order); void setShowGrid(bool show); protected Q_SLOTS: @@ -188,6 +191,7 @@ private: Q_PRIVATE_SLOT(d_func(), void _q_updateSpanInsertedColumns(QModelIndex,int,int)) Q_PRIVATE_SLOT(d_func(), void _q_updateSpanRemovedRows(QModelIndex,int,int)) Q_PRIVATE_SLOT(d_func(), void _q_updateSpanRemovedColumns(QModelIndex,int,int)) + Q_PRIVATE_SLOT(d_func(), void _q_sortIndicatorChanged(int column, Qt::SortOrder order)) }; QT_END_NAMESPACE |