From 610af2bf4d6d57f86ca71c9764b5b03b01aafad8 Mon Sep 17 00:00:00 2001 From: Thierry Bastian Date: Tue, 18 Aug 2009 11:55:07 +0200 Subject: 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 --- src/gui/itemviews/qheaderview.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } -- cgit v0.12