]> git.lyx.org Git - features.git/commitdiff
Leftover.
authorPavel Sanda <sanda@lyx.org>
Sun, 4 Nov 2012 00:29:08 +0000 (01:29 +0100)
committerPavel Sanda <sanda@lyx.org>
Sun, 4 Nov 2012 00:29:08 +0000 (01:29 +0100)
src/frontends/qt4/TocWidget.cpp

index 345b40ea21759a1ec20f42336a43b86fcd8b1b18..247addbcc9f8ee4faa4c9536cebcd2c3a072b9f8 100644 (file)
@@ -291,27 +291,10 @@ void TocWidget::setTreeDepth(int depth)
        if (!tocTV->model())
                return;
 
-#if QT_VERSION >= 0x040300
-       // this should be faster than our own code below
        if (depth == 0)
                tocTV->collapseAll();
        else
                tocTV->expandToDepth(depth - 1);
-#else
-       // expanding and then collapsing is probably better,
-       // but my qt 4.1.2 doesn't have expandAll()..
-       //tocTV->expandAll();
-       QModelIndexList indices = tocTV->model()->match(
-               tocTV->model()->index(0, 0),
-               Qt::DisplayRole, "*", -1,
-               Qt::MatchFlags(Qt::MatchWildcard|Qt::MatchRecursive));
-
-       int size = indices.size();
-       for (int i = 0; i < size; i++) {
-               QModelIndex index = indices[i];
-               tocTV->setExpanded(index, indexDepth(index) < depth_);
-       }
-#endif
 }