diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-08-18 09:55:07 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-08-18 09:59:23 (GMT) |
commit | 610af2bf4d6d57f86ca71c9764b5b03b01aafad8 (patch) | |
tree | ed9318bce6bbcb717ccffc2c52cd1896a690ca6a /src/gui | |
parent | 0f8a326341bd3aab1675acb6b15e011247f7c6f8 (diff) | |
download | Qt-610af2bf4d6d57f86ca71c9764b5b03b01aafad8.zip Qt-610af2bf4d6d57f86ca71c9764b5b03b01aafad8.tar.gz Qt-610af2bf4d6d57f86ca71c9764b5b03b01aafad8.tar.bz2 |
QHeaderView: assertion when modifying the root iem of a treewidget
dataChanged is emitted with invalid model index. We needed to handle
that.
Reviewed-by: ogoffart
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/itemviews/qheaderview.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/itemviews/qheaderview.cpp b/src/gui/itemviews/qheaderview.cpp index f7b5b6f..4ab81f5 100644 --- a/src/gui/itemviews/qheaderview.cpp +++ b/src/gui/itemviews/qheaderview.cpp @@ -1195,7 +1195,8 @@ QHeaderView::ResizeMode QHeaderView::resizeMode(int logicalIndex) const { Q_D(const QHeaderView); int visual = visualIndex(logicalIndex); - Q_ASSERT(visual != -1); + if (visual == -1) + return Fixed; //the default value return d->headerSectionResizeMode(visual); } |