Commit a267639c authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Const'ify

parent 56c9f652
Pipeline #59143 passed with stage
in 39 minutes and 54 seconds
......@@ -87,19 +87,19 @@ public:
void setCustomType(CustomTemplates::Type type);
CustomTemplates::Type customType() const;
QString to() const;
QString cc() const;
Q_REQUIRED_RESULT QString to() const;
Q_REQUIRED_RESULT QString cc() const;
void setTo(const QString &);
void setCc(const QString &);
QString content() const;
Q_REQUIRED_RESULT QString content() const;
void setContent(const QString &);
QKeySequence shortcut() const;
Q_REQUIRED_RESULT QKeySequence shortcut() const;
void setShortcut(const QKeySequence &);
QString oldName() const;
Q_REQUIRED_RESULT QString oldName() const;
void setOldName(const QString &);
private:
......
......@@ -27,9 +27,9 @@ public:
explicit CustomTemplatesMenu(QWidget *parent, KActionCollection *ac);
~CustomTemplatesMenu() override;
KActionMenu *replyActionMenu() const;
KActionMenu *replyAllActionMenu() const;
KActionMenu *forwardActionMenu() const;
Q_REQUIRED_RESULT KActionMenu *replyActionMenu() const;
Q_REQUIRED_RESULT KActionMenu *replyAllActionMenu() const;
Q_REQUIRED_RESULT KActionMenu *forwardActionMenu() const;
public Q_SLOTS:
void update();
......
......@@ -28,8 +28,8 @@ using namespace TemplateParser;
TemplateExtractHtmlElementFromMail::TemplateExtractHtmlElementFromMail(QObject *parent)
: QObject(parent)
, mPage(new TemplateWebEnginePage(this))
{
mPage = new TemplateWebEnginePage(this);
connect(mPage, &TemplateWebEnginePage::loadFinished, this, &TemplateExtractHtmlElementFromMail::slotLoadFinished);
}
......
......@@ -39,6 +39,6 @@ private:
QString mHeaderElement;
QString mHtmlElement;
TemplateWebEnginePage *mPage = nullptr;
TemplateWebEnginePage *const mPage;
};
}
......@@ -49,8 +49,8 @@ Q_SIGNALS:
void changed();
private:
QPlainTextEdit *currentTextEdit() const;
QString strOrBlank(const QString &str);
Q_REQUIRED_RESULT QPlainTextEdit *currentTextEdit() const;
Q_REQUIRED_RESULT QString strOrBlank(const QString &str);
TemplatesConfigurationPrivate *const d;
};
}
......
......@@ -14,11 +14,11 @@ using namespace TemplateParser;
TemplatesInsertCommandPushButton::TemplatesInsertCommandPushButton(QWidget *parent, const QString &name)
: QPushButton(parent)
, mMenuCommand(new TemplatesCommandMenu(this))
{
setObjectName(name);
setText(i18n("&Insert Command"));
mMenuCommand = new TemplatesCommandMenu(this);
mMenuCommand->setObjectName(QStringLiteral("templatescommandmenu"));
mMenuCommand->fillMenu();
mMenuCommand->fillSubMenus();
......
......@@ -40,7 +40,7 @@ Q_SIGNALS:
void insertCommand(const QString &cmd, int adjustCursor = 0);
private:
TemplatesCommandMenu *mMenuCommand = nullptr;
TemplatesCommandMenu *const mMenuCommand;
};
}
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