Commit b193b8b1 authored by Ahmad Samir's avatar Ahmad Samir Committed by Kurt Hindenburg
Browse files

SessionController: iterate over a const container

Also remove the action from the menu then delete it.

(cherry picked from commit 0f642449)
parent 9b9c204c
......@@ -1822,13 +1822,14 @@ void SessionController::showDisplayContextMenu(const QPoint& position)
if (!popup.isNull()) {
delete contentSeparator;
// Remove the 'Open with' actions from it.
QList<QAction*> toDelete;
for (auto *action : popup->actions()) {
const auto actList = popup->actions();
for (auto *action : actList) {
if (action->text().toLower().remove(QLatin1Char('&')).contains(i18n("open with"))) {
action = nullptr;
Please register or sign in to reply
delete action;
// Remove the Accelerator for the copy shortcut so we don't have two actions with same shortcut.
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