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
891017f0
Commit
891017f0
authored
Jan 20, 2021
by
Waqar Ahmed
Committed by
Christoph Cullmann
Jan 20, 2021
Browse files
Add a couple of extra checks for sanity and remove commented code
parent
06b74c3b
Changes
2
Hide whitespace changes
Inline
Side-by-side
kate/katecommandbar.cpp
View file @
891017f0
...
...
@@ -281,7 +281,11 @@ void KateCommandBar::updateBar(const QList<KActionCollection *> &actionCollectio
QVector
<
QPair
<
QString
,
QAction
*>>
actionList
;
for
(
const
auto
collection
:
actionCollections
)
{
for
(
const
auto
action
:
collection
->
actions
())
{
actionList
.
append
({
collection
->
componentDisplayName
(),
action
});
// sanity + empty check ensures displayable actions and removes ourself
// from the action list
if
(
action
&&
!
action
->
text
().
isEmpty
())
{
actionList
.
append
({
collection
->
componentDisplayName
(),
action
});
}
}
}
...
...
kate/katemainwindow.cpp
View file @
891017f0
...
...
@@ -254,9 +254,8 @@ void KateMainWindow::setupImportantActions()
connect
(
a
,
&
QAction
::
triggered
,
this
,
&
KateMainWindow
::
slotQuickOpen
);
a
->
setWhatsThis
(
i18n
(
"Open a form to quick open documents."
));
// kate command bar
a
=
actionCollection
()
->
addAction
(
QStringLiteral
(
"view_commandbar_open"
));
// a->setIcon(QIcon::fromTheme(QStringLiteral("quickopen")));
// a->setText(i18n("&Quick Open"));
actionCollection
()
->
setDefaultShortcut
(
a
,
QKeySequence
(
Qt
::
CTRL
|
Qt
::
ALT
|
Qt
::
Key_I
));
connect
(
a
,
&
QAction
::
triggered
,
this
,
&
KateMainWindow
::
slotCommandBarOpen
);
}
...
...
@@ -1223,6 +1222,10 @@ void KateMainWindow::slotCommandBarOpen()
auto
clients
=
guiFactory
()
->
clients
();
for
(
auto
c
:
clients
)
{
if
(
!
c
)
continue
;
if
(
!
c
->
actionCollection
())
continue
;
actionCollections
.
append
(
c
->
actionCollection
());
}
...
...
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