diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2017-12-17 19:56:35 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2017-12-22 16:17:56 +0000 |
commit | a02b371eb2f34bf198c95cf0caa1fbad639f96bb (patch) | |
tree | 1e8df591f7dab0931f7435d0f1009b9deeb6abf1 /src/widgets/itemviews/qheaderview_p.h | |
parent | 67b1fa48bea4fcb8c304f1571a9431414b8dfa2f (diff) |
QHeaderView: properly connect rows/columnsMoved
QHeaderViewPrivate reimplemented _q_layoutChanged() to handle changes
of rows/columns via layoutChanged/layoutAboutToBeChanged. This worked
fine for Qt4 but since Qt5 only the special signals rowsAboutToBeMoved/
rowsMoved are used for this (8021e2d5e7ccd09146896f788441c116f2ca6159).
With this change, QAbstractItemViewPrivate::_q_rows/columnsMoved() is
calling the virtual function _q_layoutChanged(). This resulted in a
wrong call of QHP::_q_layoutChanged() for a horizontal header when
a row changed and for a vertical header during a column change. In the
end this can lead to an unhide of hidden sections.
Task-number: QTBUG-54610
Change-Id: Ide4bfc5b24a97746fd1e5af82d3ba08257149157
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/widgets/itemviews/qheaderview_p.h')
-rw-r--r-- | src/widgets/itemviews/qheaderview_p.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/itemviews/qheaderview_p.h b/src/widgets/itemviews/qheaderview_p.h index 8fc8b88aa5..3b8e61af75 100644 --- a/src/widgets/itemviews/qheaderview_p.h +++ b/src/widgets/itemviews/qheaderview_p.h @@ -120,8 +120,8 @@ public: void updateHiddenSections(int logicalFirst, int logicalLast); void resizeSections(QHeaderView::ResizeMode globalMode, bool useGlobalMode = false); void _q_sectionsRemoved(const QModelIndex &,int,int); - void _q_layoutAboutToBeChanged(); - void _q_layoutChanged() override; + void _q_sectionsAboutToBeChanged(); + void _q_sectionsChanged(); bool isSectionSelected(int section) const; bool isFirstVisibleSection(int section) const; |