Commit b32ed13a authored by Laurent Montel's avatar Laurent Montel 😁

modernize code

parent a58bf805
Pipeline #32792 failed with stage
in 113 minutes and 27 seconds
...@@ -22,7 +22,7 @@ public: ...@@ -22,7 +22,7 @@ public:
void cleanWhitespaceHelper(const QRegExp &regExp, const QString &newText, const KIdentityManagement::Signature &sig); void cleanWhitespaceHelper(const QRegExp &regExp, const QString &newText, const KIdentityManagement::Signature &sig);
Q_REQUIRED_RESULT QVector<QPair<int, int> > signaturePositions(const KIdentityManagement::Signature &sig) const; Q_REQUIRED_RESULT QVector<QPair<int, int> > signaturePositions(const KIdentityManagement::Signature &sig) const;
RichTextComposerNg *richTextComposer = nullptr; RichTextComposerNg *const richTextComposer;
}; };
RichTextComposerSignatures::RichTextComposerSignatures(MessageComposer::RichTextComposerNg *composer, QObject *parent) RichTextComposerSignatures::RichTextComposerSignatures(MessageComposer::RichTextComposerNg *composer, QObject *parent)
......
...@@ -51,7 +51,7 @@ QString ComposerViewInterface::from() const ...@@ -51,7 +51,7 @@ QString ComposerViewInterface::from() const
return {}; return {};
} }
MessageComposer::ComposerAttachmentInterface ComposerViewInterface::attachments() MessageComposer::ComposerAttachmentInterface ComposerViewInterface::attachments() const
{ {
MessageComposer::ComposerAttachmentInterface attachmentInterface; MessageComposer::ComposerAttachmentInterface attachmentInterface;
if (mComposerView) { if (mComposerView) {
......
...@@ -27,7 +27,7 @@ public: ...@@ -27,7 +27,7 @@ public:
Q_REQUIRED_RESULT QString cc() const; Q_REQUIRED_RESULT QString cc() const;
Q_REQUIRED_RESULT QString from() const; Q_REQUIRED_RESULT QString from() const;
Q_REQUIRED_RESULT MessageComposer::ComposerAttachmentInterface attachments(); Q_REQUIRED_RESULT MessageComposer::ComposerAttachmentInterface attachments() const;
Q_REQUIRED_RESULT QString shortDate() const; Q_REQUIRED_RESULT QString shortDate() const;
Q_REQUIRED_RESULT QString longDate() const; Q_REQUIRED_RESULT QString longDate() const;
...@@ -35,7 +35,7 @@ public: ...@@ -35,7 +35,7 @@ public:
Q_REQUIRED_RESULT QString longTime() const; Q_REQUIRED_RESULT QString longTime() const;
Q_REQUIRED_RESULT QString insertDayOfWeek() const; Q_REQUIRED_RESULT QString insertDayOfWeek() const;
private: private:
ComposerViewBase *mComposerView = nullptr; ComposerViewBase *const mComposerView;
}; };
} }
......
...@@ -31,7 +31,7 @@ public: ...@@ -31,7 +31,7 @@ public:
delete ui; delete ui;
} }
Ui::ImageScalingWidget *ui = nullptr; Ui::ImageScalingWidget *const ui;
QButtonGroup *mSourceFilenameFilterGroup = nullptr; QButtonGroup *mSourceFilenameFilterGroup = nullptr;
QButtonGroup *mRecipientFilterGroup = nullptr; QButtonGroup *mRecipientFilterGroup = nullptr;
bool mWasChanged = false; bool mWasChanged = false;
......
...@@ -54,7 +54,7 @@ private Q_SLOTS: ...@@ -54,7 +54,7 @@ private Q_SLOTS:
void slotExpansionDone(KJob *); void slotExpansionDone(KJob *);
private: private:
QString mListName; const QString mListName;
QStringList mEmailAddresses; QStringList mEmailAddresses;
bool mIsEmpty = false; bool mIsEmpty = false;
}; };
......
...@@ -24,8 +24,8 @@ public: ...@@ -24,8 +24,8 @@ public:
void reposition(); void reposition();
private: private:
QWidget *mMaster = nullptr; QWidget *const mMaster;
QWidget *mSlave = nullptr; QWidget *const mSlave;
Mode mMode = Bottom; Mode mMode = Bottom;
}; };
......
...@@ -42,7 +42,7 @@ Q_SIGNALS: ...@@ -42,7 +42,7 @@ Q_SIGNALS:
void saveDistributionList(); void saveDistributionList();
private: private:
RecipientsEditor *mEditor = nullptr; RecipientsEditor *const mEditor;
QLabel *mTotalLabel = nullptr; QLabel *mTotalLabel = nullptr;
QPushButton *mDistributionListButton = nullptr; QPushButton *mDistributionListButton = nullptr;
QPushButton *mSelectButton = nullptr; QPushButton *mSelectButton = nullptr;
......
...@@ -28,7 +28,7 @@ Q_SIGNALS: ...@@ -28,7 +28,7 @@ Q_SIGNALS:
void insertVariable(MessageComposer::ConvertSnippetVariablesUtil::VariableType type); void insertVariable(MessageComposer::ConvertSnippetVariablesUtil::VariableType type);
private: private:
void initializeMenu(bool onlyMenuForCustomizeAttachmentFileName); void initializeMenu(bool onlyMenuForCustomizeAttachmentFileName);
QWidget *mParentWidget = nullptr; QWidget *const mParentWidget;
QMenu *mMenu = nullptr; QMenu *mMenu = nullptr;
}; };
} }
......
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