X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/4cf04b91dd8804f2536fc31ae2f1b486bfc8cf9c..c8a2db7d4e79422ee3301e855ac5f6bb0a09e710:/src/dolphinmainwindow.cpp diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index dc5e37ff7..7c9001b68 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -220,6 +220,7 @@ DolphinMainWindow::DolphinMainWindow() : toggleSplitView(); } updateEditActions(); + updatePasteAction(); updateViewActions(); updateGoActions(); @@ -359,6 +360,7 @@ void DolphinMainWindow::changeUrl(const KUrl& url) if (view) { view->setUrl(url); updateEditActions(); + updatePasteAction(); updateViewActions(); updateGoActions(); setUrlAsCaption(url); @@ -623,10 +625,10 @@ void DolphinMainWindow::closeEvent(QCloseEvent* event) } switch (result) { - case KDialog::Yes: + case QDialogButtonBox::Yes: // Quit break; - case KDialog::No: + case QDialogButtonBox::No: // Close only the current tab closeTab(); default: @@ -1460,6 +1462,7 @@ void DolphinMainWindow::setActiveViewContainer(DolphinViewContainer* viewContain updateHistory(); updateEditActions(); + updatePasteAction(); updateViewActions(); updateGoActions(); @@ -1579,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); @@ -1598,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"); @@ -1824,7 +1821,6 @@ void DolphinMainWindow::updateEditActions() deleteWithTrashShortcut->setEnabled(capabilities.supportsDeleting() && !enableMoveToTrash); cutAction->setEnabled(capabilities.supportsMoving()); } - updatePasteAction(); } void DolphinMainWindow::updateViewActions()