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
Kate
Commits
d78e7257
Commit
d78e7257
authored
Jan 18, 2021
by
Waqar Ahmed
Browse files
Force actions loading for menus that are loaded on demand
parent
54edbe54
Changes
1
Hide whitespace changes
Inline
Side-by-side
kate/katecommandbar.cpp
View file @
d78e7257
...
...
@@ -240,6 +240,14 @@ void KateCommandBar::slotReturnPressed()
auto
menuActions
=
menu
->
actions
();
QVector
<
QPair
<
QString
,
QAction
*>>
list
;
list
.
reserve
(
menuActions
.
size
());
// if there are no actions, trigger load actions
// this happens with some menus that are loaded on demand
if
(
menuActions
.
size
()
==
0
)
{
Q_EMIT
menu
->
aboutToShow
();
menuActions
=
menu
->
actions
();
}
for
(
auto
menuAction
:
menuActions
)
{
if
(
menuAction
)
{
list
.
append
({
KLocalizedString
::
removeAcceleratorMarker
(
act
->
text
()),
menuAction
});
...
...
@@ -247,11 +255,6 @@ void KateCommandBar::slotReturnPressed()
}
m_model
->
refresh
(
list
);
m_lineEdit
->
clear
();
// if there are no actions for some reason??! hide, dont stay empty
// This is currently happening with Color Themes :/
if
(
list
.
size
()
==
0
)
{
hide
();
}
return
;
}
else
{
act
->
trigger
();
...
...
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