Commit 3bde6ba1 authored by Toni Asensi Esteve's avatar Toni Asensi Esteve
Browse files

Delete some items that were intended to be deleted. Avoid trying to delete items that don't exist

When deleting items of a list, follow a sequence that ensures that the item
that is going to be deleted exists.

Revision: !240
parent 2c7a1f4b
Pipeline #70958 canceled with stage
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment