X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/6072005ddce81b456fdcf2e77d5156a1d86f3686..30299e00b137fb5abf31e6f82fc8f4753f9a929a:/src/dolphinrecenttabsmenu.cpp diff --git a/src/dolphinrecenttabsmenu.cpp b/src/dolphinrecenttabsmenu.cpp index 0a274fed8..38eb4f657 100644 --- a/src/dolphinrecenttabsmenu.cpp +++ b/src/dolphinrecenttabsmenu.cpp @@ -15,7 +15,7 @@ DolphinRecentTabsMenu::DolphinRecentTabsMenu(QObject* parent) : KActionMenu(QIcon::fromTheme(QStringLiteral("edit-undo")), i18n("Recently Closed Tabs"), parent) { - setDelayed(false); + setPopupMode(QToolButton::InstantPopup); setEnabled(false); m_clearListAction = new QAction(i18n("Empty Recently Closed Tabs"), this); @@ -43,7 +43,7 @@ void DolphinRecentTabsMenu::rememberClosedTab(const QUrl& url, const QByteArray& } else { insertAction(menu()->actions().at(2), action); } - emit closedTabsCountChanged(menu()->actions().size() - 2); + Q_EMIT closedTabsCountChanged(menu()->actions().size() - 2); // Assure that only up to 6 closed tabs are shown in the menu. // 8 because of clear action + separator + 6 closed tabs if (menu()->actions().size() > 8) { @@ -69,14 +69,14 @@ void DolphinRecentTabsMenu::handleAction(QAction* action) for (int i = 2; i < count; ++i) { removeAction(actions.at(i)); } - emit closedTabsCountChanged(0); + Q_EMIT closedTabsCountChanged(0); } else { const QByteArray state = action->data().toByteArray(); removeAction(action); delete action; action = nullptr; - emit restoreClosedTab(state); - emit closedTabsCountChanged(menu()->actions().size() - 2); + Q_EMIT restoreClosedTab(state); + Q_EMIT closedTabsCountChanged(menu()->actions().size() - 2); } if (menu()->actions().count() <= 2) {