X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/97415729c34851df75c77a67f27d6299c00bfbc4..99cc976a8564cbdae63e4261fcb2292a33148dbc:/src/dolphinrecenttabsmenu.cpp diff --git a/src/dolphinrecenttabsmenu.cpp b/src/dolphinrecenttabsmenu.cpp index dede2f643..d8bd06b5c 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); @@ -66,7 +66,7 @@ void DolphinRecentTabsMenu::handleAction(QAction* action) // action and the separator QList actions = menu()->actions(); const int count = actions.size(); - for (int i = 2; i < count; ++i) { + for (int i = count - 1; i >= 2; i--) { removeAction(actions.at(i)); } Q_EMIT closedTabsCountChanged(0);