From: Peter Penz Date: Wed, 6 Jan 2010 16:56:01 +0000 (+0000) Subject: Fixed issue that Ctrl+A sometimes did not result in an update of the Information... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/4fdc3bad9c1b2f168466a296f412d904e3315dc9 Fixed issue that Ctrl+A sometimes did not result in an update of the Information Panel. As a sideeffect some code simplification has been done, which was possible because of the column view refactorization some time ago. svn path=/trunk/KDE/kdebase/apps/; revision=1070740 --- diff --git a/src/dolphincontroller.cpp b/src/dolphincontroller.cpp index 89d6509ca..408abd501 100644 --- a/src/dolphincontroller.cpp +++ b/src/dolphincontroller.cpp @@ -255,11 +255,6 @@ void DolphinController::emitViewportEntered() emit viewportEntered(); } -void DolphinController::emitSelectionChanged() -{ - emit selectionChanged(); -} - void DolphinController::updateMouseButtonState() { m_mouseButtons = QApplication::mouseButtons(); diff --git a/src/dolphincontroller.h b/src/dolphincontroller.h index 8aebdcac4..d1eba97a1 100644 --- a/src/dolphincontroller.h +++ b/src/dolphincontroller.h @@ -62,7 +62,6 @@ class QPoint; * - handleKeyPressEvent() * - emitItemEntered() * - emitViewportEntered() - * - emitSelectionChanged() * - replaceUrlByClipboard() * - hideToolTip() * - setVersionControlActions() @@ -293,12 +292,6 @@ public slots: */ void emitViewportEntered(); - /** - * Emits the signal selectionChanged(). The method should be invoked by - * the view implementation whenever the selection has been changed. - */ - void emitSelectionChanged(); - signals: /** * Is emitted if the URL for the Dolphin controller has been changed @@ -407,13 +400,6 @@ signals: */ void viewportEntered(); - /** - * Is emitted whenever the selection of the view implementation - * has been changed (see emitSelectionChanged()). The abstract - * Dolphin view connects to this signal. - */ - void selectionChanged(); - /** * Is emitted if the view should respect the name filter \a nameFilter. The view * implementation must connect to this signal if it supports name filters. diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp index c0d700eb5..e70cd446b 100644 --- a/src/dolphinview.cpp +++ b/src/dolphinview.cpp @@ -1357,8 +1357,6 @@ void DolphinView::createView() view->viewport()->installEventFilter(this); m_controller->setItemView(view); - connect(m_controller, SIGNAL(selectionChanged()), - this, SLOT(emitDelayedSelectionChangedSignal())); // When changing the view mode, the selection is lost due to reinstantiating // a new item view with a custom selection model. Pass the ownership of the @@ -1369,6 +1367,8 @@ void DolphinView::createView() m_selectionModel = view->selectionModel(); } m_selectionModel->setParent(this); + connect(view->selectionModel(), SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)), + this, SLOT(emitDelayedSelectionChangedSignal())); connect(view->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(emitContentsMoved())); diff --git a/src/panels/information/informationpanel.cpp b/src/panels/information/informationpanel.cpp index 05b1f89de..3d2163baa 100644 --- a/src/panels/information/informationpanel.cpp +++ b/src/panels/information/informationpanel.cpp @@ -171,9 +171,8 @@ void InformationPanel::showItemInfo() } else { // no item is hovered and no selection has been done: provide // an item for the directory represented by m_shownUrl - m_fileItem = KFileItem(KFileItem::Unknown, KFileItem::Unknown, m_shownUrl); - m_fileItem.refresh(); - item = m_fileItem; + item = KFileItem(KFileItem::Unknown, KFileItem::Unknown, m_shownUrl); + item.refresh(); } m_content->showItem(item); diff --git a/src/viewextensionsfactory.cpp b/src/viewextensionsfactory.cpp index 86311e28d..ce997bf8b 100644 --- a/src/viewextensionsfactory.cpp +++ b/src/viewextensionsfactory.cpp @@ -112,10 +112,6 @@ ViewExtensionsFactory::ViewExtensionsFactory(QAbstractItemView* view, connect(dolphinView, SIGNAL(sortFoldersFirstChanged(bool)), this, SLOT(slotSortFoldersFirstChanged(bool))); - // inform the controller about selection changes - connect(view->selectionModel(), SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)), - controller, SLOT(emitSelectionChanged())); - // Give the view the ability to auto-expand its directories on hovering // (the column view takes care about this itself). If the details view // uses expandable folders, the auto-expanding should be used always.