Commit 271c1226 authored by Pablo Rauzy's avatar Pablo Rauzy Committed by Christoph Cullmann
Browse files

improving code quality

parent 05bc408d
......@@ -147,7 +147,7 @@ void KeyboardMacrosPlugin::cancel()
stop(false);
}
bool KeyboardMacrosPlugin::play(QString name)
bool KeyboardMacrosPlugin::play(const QString &name)
{
Macro m;
if (!name.isEmpty() && m_namedMacros.contains(name)) {
......@@ -174,7 +174,7 @@ bool KeyboardMacrosPlugin::play(QString name)
return true;
}
bool KeyboardMacrosPlugin::save(QString name)
bool KeyboardMacrosPlugin::save(const QString &name)
{
// we don't need to save macros that do nothing
if (m_macro.isEmpty()) {
......@@ -185,7 +185,7 @@ bool KeyboardMacrosPlugin::save(QString name)
return true;
}
bool KeyboardMacrosPlugin::load(QString name)
bool KeyboardMacrosPlugin::load(const QString &name)
{
if (!m_namedMacros.contains(name)) {
return false;
......@@ -200,7 +200,7 @@ bool KeyboardMacrosPlugin::load(QString name)
return true;
}
bool KeyboardMacrosPlugin::remove(QString name)
bool KeyboardMacrosPlugin::remove(const QString &name)
{
if (!m_namedMacros.contains(name)) {
return false;
......
......@@ -60,11 +60,11 @@ private:
void record();
void stop(bool save);
void cancel();
bool play(QString name = QString());
bool play(const QString &name = QString());
bool save(QString name);
bool load(QString name);
bool remove(QString name);
bool save(const QString &name);
bool load(const QString &name);
bool remove(const QString &name);
bool m_recording = false;
Macro m_tape;
......@@ -107,7 +107,7 @@ class KeyboardMacrosPluginCommands : public KTextEditor::Command
Q_OBJECT
public:
KeyboardMacrosPluginCommands(KeyboardMacrosPlugin *plugin);
explicit KeyboardMacrosPluginCommands(KeyboardMacrosPlugin *plugin);
bool exec(KTextEditor::View *view, const QString &cmd, QString &msg, const KTextEditor::Range & = KTextEditor::Range::invalid()) override;
bool help(KTextEditor::View *, const QString &cmd, QString &msg) override;
......
Supports Markdown
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