mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-19 16:31:21 +00:00
minor cleanup: no need to create a slot which just invokes another method, just use the other method as slot
svn path=/trunk/KDE/kdebase/apps/; revision=778423
This commit is contained in:
parent
90625552ea
commit
eb7294fa10
|
@ -212,9 +212,20 @@ void DolphinMainWindow::slotRequestItemInfo(const KFileItem& item)
|
||||||
emit requestItemInfo(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)
|
void DolphinMainWindow::updateFilterBarAction(bool show)
|
||||||
|
@ -897,22 +908,6 @@ void DolphinMainWindow::setupDockWidgets()
|
||||||
placesView, SLOT(setUrl(KUrl)));
|
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()
|
void DolphinMainWindow::updateEditActions()
|
||||||
{
|
{
|
||||||
const KFileItemList list = m_activeViewContainer->view()->selectedItems();
|
const KFileItemList list = m_activeViewContainer->view()->selectedItems();
|
||||||
|
@ -991,7 +986,7 @@ void DolphinMainWindow::connectViewSignals(int viewIndex)
|
||||||
connect(navigator, SIGNAL(urlChanged(const KUrl&)),
|
connect(navigator, SIGNAL(urlChanged(const KUrl&)),
|
||||||
this, SLOT(changeUrl(const KUrl&)));
|
this, SLOT(changeUrl(const KUrl&)));
|
||||||
connect(navigator, SIGNAL(historyChanged()),
|
connect(navigator, SIGNAL(historyChanged()),
|
||||||
this, SLOT(slotHistoryChanged()));
|
this, SLOT(updateHistory()));
|
||||||
connect(navigator, SIGNAL(editableStateChanged(bool)),
|
connect(navigator, SIGNAL(editableStateChanged(bool)),
|
||||||
this, SLOT(slotEditableStateChanged(bool)));
|
this, SLOT(slotEditableStateChanged(bool)));
|
||||||
}
|
}
|
||||||
|
|
|
@ -301,7 +301,7 @@ private slots:
|
||||||
* Updates the state of the 'Back' and 'Forward' menu
|
* Updates the state of the 'Back' and 'Forward' menu
|
||||||
* actions corresponding the the current history.
|
* actions corresponding the the current history.
|
||||||
*/
|
*/
|
||||||
void slotHistoryChanged();
|
void updateHistory();
|
||||||
|
|
||||||
/** Updates the state of the 'Show filter bar' menu action. */
|
/** Updates the state of the 'Show filter bar' menu action. */
|
||||||
void updateFilterBarAction(bool show);
|
void updateFilterBarAction(bool show);
|
||||||
|
@ -329,7 +329,6 @@ private:
|
||||||
|
|
||||||
void setupActions();
|
void setupActions();
|
||||||
void setupDockWidgets();
|
void setupDockWidgets();
|
||||||
void updateHistory();
|
|
||||||
void updateEditActions();
|
void updateEditActions();
|
||||||
void updateViewActions();
|
void updateViewActions();
|
||||||
void updateGoActions();
|
void updateGoActions();
|
||||||
|
|
Loading…
Reference in a new issue