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);
// 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);