]> cloud.milkyroute.net Git - dolphin.git/commitdiff
removed unused method expandSelectionParent (it is not invoked anymore since KDirList...
authorPeter Penz <peter.penz19@gmail.com>
Fri, 28 Sep 2007 07:18:37 +0000 (07:18 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Fri, 28 Sep 2007 07:18:37 +0000 (07:18 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=718182

src/treeviewsidebarpage.cpp
src/treeviewsidebarpage.h

index 0950dbdccc833c2de69a1902dff911503541f7c3..680b2d3791c8853eb9e4deb6d77d83ebd3e6d5ec 100644 (file)
@@ -145,34 +145,6 @@ void TreeViewSidebarPage::contextMenuEvent(QContextMenuEvent* event)
     contextMenu.open();
 }
 
-void TreeViewSidebarPage::expandSelectionParent()
-{
-    disconnect(m_dirLister, SIGNAL(completed()),
-               this, SLOT(expandSelectionParent()));
-
-    // expand the parent folder of the selected item
-    KUrl parentUrl = url().upUrl();
-    if (!m_dirLister->url().isParentOf(parentUrl)) {
-        return;
-    }
-
-    QModelIndex index = m_dolphinModel->indexForUrl(parentUrl);
-    if (index.isValid()) {
-        QModelIndex proxyIndex = m_proxyModel->mapFromSource(index);
-        m_treeView->setExpanded(proxyIndex, true);
-
-        // select the item and assure that the item is visible
-        index = m_dolphinModel->indexForUrl(url());
-        if (index.isValid()) {
-            proxyIndex = m_proxyModel->mapFromSource(index);
-            m_treeView->scrollTo(proxyIndex);
-
-            QItemSelectionModel* selModel = m_treeView->selectionModel();
-            selModel->setCurrentIndex(proxyIndex, QItemSelectionModel::Select);
-        }
-    }
-}
-
 void TreeViewSidebarPage::updateActiveView(const QModelIndex& index)
 {
     const QModelIndex dirIndex = m_proxyModel->mapToSource(index);
index ec0907ac256bd20ce6fd3f480c71a7ffa6415e97..524e18322efcaaa4548cc8860b4af16d6f5b7441 100644 (file)
@@ -62,13 +62,6 @@ protected:
     virtual void contextMenuEvent(QContextMenuEvent* event);
 
 private slots:
-    /**
-     * Expands the tree in a way that the item with the URL m_selectedUrl
-     * gets visible. Is called by TreeViewSidebarPage::updateSelection()
-     * if the dir lister has been completed.
-     */
-    void expandSelectionParent();
-
     /**
      * Updates the active view to the URL
      * which is given by the item with the index \a index.