Commit 48af912b authored by Chau Duong's avatar Chau Duong Committed by Elvis Angelaccio
Browse files

Add const

parent 6df59136
Pipeline #45568 passed with stage
in 6 minutes and 52 seconds
......@@ -38,8 +38,8 @@ namespace
}
ContextMenuSettingsPage::ContextMenuSettingsPage(QWidget* parent,
KActionCollection* actions,
QStringList actionIds) :
const KActionCollection* actions,
const QStringList& actionIds) :
SettingsPageBase(parent),
m_initialized(false),
m_serviceModel(nullptr),
......@@ -230,8 +230,8 @@ void ContextMenuSettingsPage::showEvent(QShowEvent* event)
ContextMenuSettings::showCopyMoveMenu());
// Add other built-in actions
for (const QString& id : qAsConst(m_actionIds)) {
QAction* action = m_actions->action(id);
for (const QString& id : m_actionIds) {
const QAction* action = m_actions->action(id);
if (action) {
addRow(action->icon().name(), action->text(), id, entryVisible(id));
}
......
......@@ -25,7 +25,9 @@ class ContextMenuSettingsPage : public SettingsPageBase
Q_OBJECT
public:
explicit ContextMenuSettingsPage(QWidget* parent, KActionCollection* actions, QStringList actionIds);
explicit ContextMenuSettingsPage(QWidget* parent,
const KActionCollection* actions,
const QStringList& actionIds);
~ContextMenuSettingsPage() override;
/** @see SettingsPageBase::applySettings() */
......@@ -68,8 +70,8 @@ private:
QListView* m_listView;
QLineEdit *m_searchLineEdit;
QStringList m_enabledVcsPlugins;
KActionCollection* m_actions;
QStringList m_actionIds;
const KActionCollection* m_actions;
const QStringList m_actionIds;
};
#endif
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