From 0a607c28f51cc54dd3a7f9c8476d5185c455a78b Mon Sep 17 00:00:00 2001 From: Arjun AK Date: Wed, 25 Jun 2014 18:53:05 +0530 Subject: [PATCH] prevent goBack, goForward, goHome and goUp from being called twice REVIEW: 118782 --- src/dolphinmainwindow.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 924354b4b..7c9001b68 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -1582,7 +1582,6 @@ void DolphinMainWindow::setupActions() // setup 'Go' menu QAction* backAction = KStandardAction::back(this, SLOT(goBack()), actionCollection()); - connect(backAction, &QAction::triggered, this, static_cast(&DolphinMainWindow::goBack)); auto backShortcuts = backAction->shortcuts(); backShortcuts.append(QKeySequence(Qt::Key_Backspace)); backAction->setShortcuts(backShortcuts); @@ -1601,14 +1600,9 @@ void DolphinMainWindow::setupActions() m_recentTabsMenu->addSeparator(); m_recentTabsMenu->setEnabled(false); - QAction* forwardAction = KStandardAction::forward(this, SLOT(goForward()), actionCollection()); - connect(forwardAction, &QAction::triggered, this, static_cast(&DolphinMainWindow::goForward)); - - QAction* upAction = KStandardAction::up(this, SLOT(goUp()), actionCollection()); - connect(upAction, &QAction::triggered, this, static_cast(&DolphinMainWindow::goUp)); - - QAction* homeAction = KStandardAction::home(this, SLOT(goHome()), actionCollection()); - connect(homeAction, &QAction::triggered, this, static_cast(&DolphinMainWindow::goHome)); + KStandardAction::forward(this, SLOT(goForward()), actionCollection()); + KStandardAction::up(this, SLOT(goUp()), actionCollection()); + KStandardAction::home(this, SLOT(goHome()), actionCollection()); // setup 'Tools' menu QAction* showFilterBar = actionCollection()->addAction("show_filter_bar"); -- 2.47.3