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
bf73e9dd
Commit
bf73e9dd
authored
Jan 19, 2021
by
Waqar Ahmed
Committed by
Christoph Cullmann
Jan 20, 2021
Browse files
Clean up - avoid unnecessary copying
parent
2733ec1c
Changes
2
Hide whitespace changes
Inline
Side-by-side
kate/katecommandbar.cpp
View file @
bf73e9dd
...
...
@@ -225,8 +225,6 @@ KateCommandBar::KateCommandBar(QWidget *parent)
m_proxyModel
=
new
CommandBarFilterModel
(
this
);
m_proxyModel
->
setFilterRole
(
Qt
::
DisplayRole
);
m_proxyModel
->
setSortRole
(
CommandModel
::
Score
);
m_proxyModel
->
setFilterCaseSensitivity
(
Qt
::
CaseInsensitive
);
m_proxyModel
->
setSortCaseSensitivity
(
Qt
::
CaseInsensitive
);
m_proxyModel
->
setFilterKeyColumn
(
0
);
connect
(
m_lineEdit
,
&
QLineEdit
::
returnPressed
,
this
,
&
KateCommandBar
::
slotReturnPressed
);
...
...
@@ -253,7 +251,7 @@ KateCommandBar::KateCommandBar(QWidget *parent)
setHidden
(
true
);
}
void
KateCommandBar
::
updateBar
(
QList
<
KActionCollection
*>
actionCollections
)
void
KateCommandBar
::
updateBar
(
const
QList
<
KActionCollection
*>
&
actionCollections
)
{
QVector
<
QPair
<
QString
,
QAction
*>>
actionList
;
for
(
const
auto
collection
:
actionCollections
)
{
...
...
@@ -262,7 +260,7 @@ void KateCommandBar::updateBar(QList<KActionCollection *> actionCollections)
}
}
m_model
->
refresh
(
actionList
);
m_model
->
refresh
(
std
::
move
(
actionList
)
)
;
reselectFirst
();
updateViewGeometry
();
...
...
kate/katecommandbar.h
View file @
bf73e9dd
...
...
@@ -19,7 +19,7 @@ class KateCommandBar : public QMenu
public:
KateCommandBar
(
QWidget
*
parent
=
nullptr
);
void
updateBar
(
QList
<
KActionCollection
*>
actions
);
void
updateBar
(
const
QList
<
KActionCollection
*>
&
actions
);
void
updateViewGeometry
();
...
...
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