summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-05-14 09:19:46 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-05-14 09:24:00 (GMT)
commitcf9277b5e9e20d47681ab084e4410c3566425c3c (patch)
treeee2ccce69d68fa1bcbe0bdd9c61abd99535a5f4c
parente7ea80161aa91369cf700b79e96e97367ecf0ff6 (diff)
downloadQt-cf9277b5e9e20d47681ab084e4410c3566425c3c.zip
Qt-cf9277b5e9e20d47681ab084e4410c3566425c3c.tar.gz
Qt-cf9277b5e9e20d47681ab084e4410c3566425c3c.tar.bz2
Remove useless code and comment in QTreeView
In 8cd19116ae81c99fe28fbf91aa7f4c1c08163fe0 we changed viewItems to always contains the index to the columns 0, even if this columns is hidden. So this code and comment are now useless.
-rw-r--r--src/gui/itemviews/qtreeview.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp
index f6c5cf0..d742698 100644
--- a/src/gui/itemviews/qtreeview.cpp
+++ b/src/gui/itemviews/qtreeview.cpp
@@ -3086,10 +3086,6 @@ void QTreeViewPrivate::layout(int i)
Q_Q(QTreeView);
QModelIndex current;
QModelIndex parent = (i < 0) ? (QModelIndex)root : modelIndex(i);
- // modelIndex() will return an index that don't have a parent if column 0 is hidden,
- // so we must make sure that parent points to the actual parent that has children.
- if (parent != root)
- parent = model->index(parent.row(), 0, parent.parent());
if (i>=0 && !parent.isValid()) {
//modelIndex() should never return something invalid for the real items.