mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-21 17:30:15 +00:00
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: https://invent.kde.org/system/dolphin/-/merge_requests/240
This commit is contained in:
parent
2c7a1f4b4c
commit
3bde6ba13c
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue