]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinrecenttabsmenu.cpp
GIT_SILENT made messages (after extraction)
[dolphin.git] / src / dolphinrecenttabsmenu.cpp
index dede2f643fca56c2443fda451f7739b68def4927..d8bd06b5c82a529ba5da17f8edbdb1a03f49e083 100644 (file)
@@ -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<QAction*> 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);