diff options
author | Thorbjørn Lund Martsum <tmartsum@gmail.com> | 2017-12-28 13:10:19 +0000 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@qt.io> | 2018-01-05 08:22:30 +0000 |
commit | d5a11a0ec206f6b9e7fd50b37717ca820d6ab98a (patch) | |
tree | f380303799a13e62e0f3718dee6f355324924d1f /tests | |
parent | 7e9460306bd4165663d6403db8a5f9faa2e3d86a (diff) |
Revert "QTreeView: Make sure QHeaderView is notified on layoutChanged()"
It caused some sorting issues.
This reverts commit 93dabeba9dc5f6cbab60e65b3cc8df5fe48745a9.
Change-Id: Ie8c7f2d47885be6626ddb6284474a78dcf09cf33
Task-number: QTBUG-65478
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp b/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp index 5de0ca6c22..dfcaa9b5b9 100644 --- a/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp +++ b/tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp @@ -313,17 +313,6 @@ public: endRemoveColumns(); } - void removeAddLastColumnLayoutChanged() // for taskQTBUG_41124 - { - // make sure QHeaderView::_q_layoutChanged() is called - emit layoutAboutToBeChanged(); - --cols; - emit layoutChanged(); - emit layoutAboutToBeChanged(); - ++cols; - emit layoutChanged(); - } - void removeAllColumns() { beginRemoveColumns(QModelIndex(), 0, cols - 1); @@ -1317,19 +1306,6 @@ void tst_QTreeView::columnHidden() for (int c = 0; c < model.columnCount(); ++c) QCOMPARE(view.isColumnHidden(c), true); view.update(); - - // QTBUG_41124: - // QHeaderViewPrivate::_q_layoutChanged was not called because it was - // disconnected in QTreeView::setModel(). _q_layoutChanged restores - // the hidden sections which is tested here - view.setColumnHidden(model.cols - 1, true); - model.removeAddLastColumnLayoutChanged(); - // we removed the last column and added a new one - // (with layoutToBeChanged/layoutChanged() for both) so column - // 1 is a new column and therefore must not be hidden when - // _q_layoutChanged() is called and is doing the right stuff - QCOMPARE(view.isColumnHidden(model.cols - 1), false); - } void tst_QTreeView::rowHidden() |