recentTabsMenu, SLOT(rememberClosedTab(KUrl,KUrl)));
connect(recentTabsMenu, SIGNAL(restoreClosedTab(KUrl,KUrl)),
this, SLOT(openNewActivatedTab(KUrl,KUrl)));
+ connect(recentTabsMenu, SIGNAL(closedTabsCountChanged(uint)),
+ this, SLOT(closedTabsCountChanged(uint)));
+
+ KAction* undoCloseTab = actionCollection()->addAction("undo_close_tab");
+ undoCloseTab->setText(i18nc("@action:inmenu File", "Undo close tab"));
+ undoCloseTab->setShortcut(Qt::CTRL | Qt::SHIFT | Qt::Key_T);
+ undoCloseTab->setIcon(KIcon("edit-undo"));
+ undoCloseTab->setEnabled(false);
+ connect(undoCloseTab, SIGNAL(triggered()), recentTabsMenu, SLOT(undoCloseTab()));
- KAction* forwardAction = KStandardAction::forward(this, SLOT(goForward()), actionCollection());
- connect(forwardAction, SIGNAL(triggered(Qt::MouseButtons,Qt::KeyboardModifiers)), this, SLOT(goForward(Qt::MouseButtons)));
-
- KAction* upAction = KStandardAction::up(this, SLOT(goUp()), actionCollection());
- connect(upAction, SIGNAL(triggered(Qt::MouseButtons,Qt::KeyboardModifiers)), this, SLOT(goUp(Qt::MouseButtons)));
-
- KAction* homeAction = KStandardAction::home(this, SLOT(goHome()), actionCollection());
- connect(homeAction, SIGNAL(triggered(Qt::MouseButtons,Qt::KeyboardModifiers)), this, SLOT(goHome(Qt::MouseButtons)));
+ KStandardAction::forward(this, SLOT(goForward()), actionCollection());
+ KStandardAction::up(this, SLOT(goUp()), actionCollection());
+ KStandardAction::home(this, SLOT(goHome()), actionCollection());
// setup 'Tools' menu
- KAction* showFilterBar = actionCollection()->addAction("show_filter_bar");
+ QAction* showFilterBar = actionCollection()->addAction("show_filter_bar");
showFilterBar->setText(i18nc("@action:inmenu Tools", "Show Filter Bar"));
- showFilterBar->setIcon(KIcon("view-filter"));
+ showFilterBar->setIcon(QIcon::fromTheme("view-filter"));
showFilterBar->setShortcut(Qt::CTRL | Qt::Key_I);
- connect(showFilterBar, SIGNAL(triggered()), this, SLOT(showFilterBar()));
+ connect(showFilterBar, &QAction::triggered, this, &DolphinMainWindow::showFilterBar);
- KAction* compareFiles = actionCollection()->addAction("compare_files");
+ QAction* compareFiles = actionCollection()->addAction("compare_files");
compareFiles->setText(i18nc("@action:inmenu Tools", "Compare Files"));
- compareFiles->setIcon(KIcon("kompare"));
+ compareFiles->setIcon(QIcon::fromTheme("kompare"));
compareFiles->setEnabled(false);
- connect(compareFiles, SIGNAL(triggered()), this, SLOT(compareFiles()));
+ connect(compareFiles, &QAction::triggered, this, &DolphinMainWindow::compareFiles);
- KAction* openTerminal = actionCollection()->addAction("open_terminal");
+ QAction* openTerminal = actionCollection()->addAction("open_terminal");
openTerminal->setText(i18nc("@action:inmenu Tools", "Open Terminal"));
- openTerminal->setIcon(KIcon("utilities-terminal"));
+ openTerminal->setIcon(QIcon::fromTheme("utilities-terminal"));
openTerminal->setShortcut(Qt::SHIFT | Qt::Key_F4);
- connect(openTerminal, SIGNAL(triggered()), this, SLOT(openTerminal()));
+ connect(openTerminal, &QAction::triggered, this, &DolphinMainWindow::openTerminal);
// setup 'Settings' menu
KToggleAction* showMenuBar = KStandardAction::showMenubar(0, 0, actionCollection());