QTableView: prevent QTableView from hanging when removing rows.
authorPierre Rossi <pierre.rossi@nokia.com>
Mon, 4 Apr 2011 13:58:42 +0000 (15:58 +0200)
committerOlivier Goffart <olivier.goffart@nokia.com>
Tue, 10 May 2011 10:54:44 +0000 (12:54 +0200)
commit5346d77e8ccba0a7bfb0cc1f257a26865a1c9d42
tree7a58ff299afd4caeca3c9baa560eb21b212216de
parent55bfa460d2974ebe5ace4def554c5f54d6103312
QTableView: prevent QTableView from hanging when removing rows.

The problem was introduced in cd2afafb where we removed some code that
was meant to adjust the header's offset upon row removal.
The problem with this is that visualIndexAt() is likely to return -1 in
QHeaderView::paintEvent, which in turn will lead to calling paintSection
for each and every section.

Task-number: QTBUG-18551
Reviewed-by: Thierry
(cherry picked from commit d814e378987348ce2123d083b01ea6fb6c3e6bbf)
src/gui/itemviews/qtableview.cpp
src/gui/itemviews/qtableview.h