Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Konsole
Commits
0f642449
Commit
0f642449
authored
Nov 24, 2020
by
Ahmad Samir
Browse files
SessionController: iterate over a const container
Also remove the action from the menu then delete it.
parent
043c424a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/session/SessionController.cpp
View file @
0f642449
...
...
@@ -1826,13 +1826,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"
)))
{
toDelete
.
append
(
action
);
popup
->
removeAction
(
action
);
action
=
nullptr
;
delete
action
;
}
}
qDeleteAll
(
toDelete
);
// Remove the Accelerator for the copy shortcut so we don't have two actions with same shortcut.
copy
->
setShortcut
({});
...
...
Ahmad Samir
@ahmadsamir
mentioned in commit
b193b8b1
·
Nov 26, 2020
mentioned in commit
b193b8b1
mentioned in commit b193b8b1242d1570361d2388c475b5a619c19afe
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment