diff options
| author | Peter Penz <[email protected]> | 2007-09-28 07:18:37 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-09-28 07:18:37 +0000 |
| commit | 1325d97bdd28c7e5aee80157b9f8098c0d1876ca (patch) | |
| tree | 3dc814ba007c2fc9d572c66edc1be9c75e2447b3 | |
| parent | 3a56e202622f8d4847f930a0a56750f266f3b025 (diff) | |
removed unused method expandSelectionParent (it is not invoked anymore since KDirLister::expandToUrl() is available)
svn path=/trunk/KDE/kdebase/apps/; revision=718182
| -rw-r--r-- | src/treeviewsidebarpage.cpp | 28 | ||||
| -rw-r--r-- | src/treeviewsidebarpage.h | 7 |
2 files changed, 0 insertions, 35 deletions
diff --git a/src/treeviewsidebarpage.cpp b/src/treeviewsidebarpage.cpp index 0950dbdcc..680b2d379 100644 --- a/src/treeviewsidebarpage.cpp +++ b/src/treeviewsidebarpage.cpp @@ -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); diff --git a/src/treeviewsidebarpage.h b/src/treeviewsidebarpage.h index ec0907ac2..524e18322 100644 --- a/src/treeviewsidebarpage.h +++ b/src/treeviewsidebarpage.h @@ -63,13 +63,6 @@ protected: 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. */ |
