]> cloud.milkyroute.net Git - dolphin.git/commitdiff
minor cleanup: no need to create a slot which just invokes another method, just use...
authorPeter Penz <peter.penz19@gmail.com>
Sat, 23 Feb 2008 15:48:56 +0000 (15:48 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Sat, 23 Feb 2008 15:48:56 +0000 (15:48 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=778423

src/dolphinmainwindow.cpp
src/dolphinmainwindow.h

index 27ed1b89b34d053e02654ef35bfacc38ef626f34..ca392c134525c1287cb3d65377ad913c6d7197d9 100644 (file)
@@ -212,9 +212,20 @@ void DolphinMainWindow::slotRequestItemInfo(const KFileItem& item)
     emit requestItemInfo(item);
 }
 
-void DolphinMainWindow::slotHistoryChanged()
+void DolphinMainWindow::updateHistory()
 {
-    updateHistory();
+    const KUrlNavigator* urlNavigator = m_activeViewContainer->urlNavigator();
+    const int index = urlNavigator->historyIndex();
+
+    QAction* backAction = actionCollection()->action("go_back");
+    if (backAction != 0) {
+        backAction->setEnabled(index < urlNavigator->historySize() - 1);
+    }
+
+    QAction* forwardAction = actionCollection()->action("go_forward");
+    if (forwardAction != 0) {
+        forwardAction->setEnabled(index > 0);
+    }
 }
 
 void DolphinMainWindow::updateFilterBarAction(bool show)
@@ -897,22 +908,6 @@ void DolphinMainWindow::setupDockWidgets()
             placesView, SLOT(setUrl(KUrl)));
 }
 
-void DolphinMainWindow::updateHistory()
-{
-    const KUrlNavigator* urlNavigator = m_activeViewContainer->urlNavigator();
-    const int index = urlNavigator->historyIndex();
-
-    QAction* backAction = actionCollection()->action("go_back");
-    if (backAction != 0) {
-        backAction->setEnabled(index < urlNavigator->historySize() - 1);
-    }
-
-    QAction* forwardAction = actionCollection()->action("go_forward");
-    if (forwardAction != 0) {
-        forwardAction->setEnabled(index > 0);
-    }
-}
-
 void DolphinMainWindow::updateEditActions()
 {
     const KFileItemList list = m_activeViewContainer->view()->selectedItems();
@@ -991,7 +986,7 @@ void DolphinMainWindow::connectViewSignals(int viewIndex)
     connect(navigator, SIGNAL(urlChanged(const KUrl&)),
             this, SLOT(changeUrl(const KUrl&)));
     connect(navigator, SIGNAL(historyChanged()),
-            this, SLOT(slotHistoryChanged()));
+            this, SLOT(updateHistory()));
     connect(navigator, SIGNAL(editableStateChanged(bool)),
             this, SLOT(slotEditableStateChanged(bool)));
 }
index a7204703997619f3870a1d7f3f09942a9a3ac036..39cd7431fae41e549b696d2b397e5837bf398535 100644 (file)
@@ -301,7 +301,7 @@ private slots:
      * Updates the state of the 'Back' and 'Forward' menu
      * actions corresponding the the current history.
      */
-    void slotHistoryChanged();
+    void updateHistory();
 
     /** Updates the state of the 'Show filter bar' menu action. */
     void updateFilterBarAction(bool show);
@@ -329,7 +329,6 @@ private:
 
     void setupActions();
     void setupDockWidgets();
-    void updateHistory();
     void updateEditActions();
     void updateViewActions();
     void updateGoActions();