mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
Add const
This commit is contained in:
parent
6df591368e
commit
48af912b83
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue