Commit 1c0d57ab authored by Laurent Montel's avatar Laurent Montel 😁

const'ify pointer

parent 1b8291d1
Pipeline #32659 failed with stage
in 25 minutes and 5 seconds
......@@ -47,7 +47,7 @@ public:
protected:
Q_REQUIRED_RESULT KSieveUi::SieveImapAccountSettings sieveImapAccountSettings() const;
Q_REQUIRED_RESULT QStringList sieveCapabilities() const;
SieveEditorGraphicalModeWidget *mSieveGraphicalModeWidget = nullptr;
SieveEditorGraphicalModeWidget *const mSieveGraphicalModeWidget;
Q_SIGNALS:
void valueChanged();
......
......@@ -55,7 +55,7 @@ private:
QGridLayout *mLayout = nullptr;
SieveHelpButton *mHelpButton = nullptr;
QToolButton *mCommentButton = nullptr;
SieveEditorGraphicalModeWidget *mSieveGraphicalModeWidget = nullptr;
SieveEditorGraphicalModeWidget *const mSieveGraphicalModeWidget;
};
class SieveActionWidgetLister : public KPIM::KWidgetLister
......
......@@ -51,7 +51,7 @@ private:
QGridLayout *mLayout = nullptr;
SieveHelpButton *mHelpButton = nullptr;
QToolButton *mCommentButton = nullptr;
SieveEditorGraphicalModeWidget *mSieveGraphicalModeWidget = nullptr;
SieveEditorGraphicalModeWidget *const mSieveGraphicalModeWidget;
};
class SieveConditionWidgetLister : public KPIM::KWidgetLister
......
......@@ -54,7 +54,7 @@ private:
void updateCondition();
MatchCondition mMatchCondition;
QGroupBox *mConditions = nullptr;
SieveEditorGraphicalModeWidget *mSieveGraphicalModeWidget = nullptr;
SieveEditorGraphicalModeWidget *const mSieveGraphicalModeWidget;
SieveConditionWidgetLister *mScriptConditionLister = nullptr;
SieveActionWidgetLister *mScriptActionLister = nullptr;
QRadioButton *mMatchAll = nullptr;
......
......@@ -44,10 +44,10 @@ private Q_SLOTS:
private:
SieveScriptBlockWidget *createScriptBlock(KSieveUi::SieveWidgetPageAbstract::PageType type);
bool hasAnElseBlock() const;
QString blockName(SieveWidgetPageAbstract::PageType type) const;
Q_REQUIRED_RESULT bool hasAnElseBlock() const;
Q_REQUIRED_RESULT QString blockName(SieveWidgetPageAbstract::PageType type) const;
SieveEditorGraphicalModeWidget *mSieveGraphicalModeWidget = nullptr;
SieveEditorGraphicalModeWidget *const mSieveGraphicalModeWidget;
SieveScriptTabWidget *mTabWidget = nullptr;
SieveIncludeWidget *mIncludeWidget = nullptr;
SieveForEveryPartWidget *mForEveryPartWidget = nullptr;
......
......@@ -55,7 +55,7 @@ private:
QUrl mUrl;
KSyntaxHighlighting::Repository mRepo;
SieveImapPasswordProvider *mPasswordProvider = nullptr;
SieveImapPasswordProvider *const mPasswordProvider;
KPIMTextEdit::PlainTextEditorWidget *mEdit = nullptr;
QStringList mResourceIdentifier;
QStringList mScriptList;
......
......@@ -23,8 +23,8 @@ public:
explicit SieveEditor(QWidget *parent = nullptr);
~SieveEditor() override;
QString script() const;
QString originalScript() const;
Q_REQUIRED_RESULT QString script() const;
Q_REQUIRED_RESULT QString originalScript() const;
void setScript(const QString &script, bool clearUndoRedo = false);
void setDebugScript(const QString &debug);
void addFailedMessage(const QString &err);
......
......@@ -23,7 +23,7 @@ protected:
void paintEvent(QPaintEvent *event) override;
private:
SieveTextEdit *m_sieveTextEdit = nullptr;
SieveTextEdit *const m_sieveTextEdit;
};
}
......
......@@ -18,7 +18,7 @@ public:
explicit SieveTextEditorSpellCheckDecorator(SieveTextEdit *plainTextEdit);
Q_REQUIRED_RESULT bool isSpellCheckingEnabledForBlock(const QString &textBlock) const override;
private:
SieveTextEdit *mPlainTextEdit = nullptr;
SieveTextEdit *const mPlainTextEdit;
};
}
#endif // SIEVETEXTEDITORSPELLCHECKDECORATOR_H
......@@ -14,8 +14,6 @@ using namespace KSieveUi;
GenerateGlobalScriptJob::GenerateGlobalScriptJob(const QUrl &url, QObject *parent)
: QObject(parent)
, mCurrentUrl(url)
, mMasterJob(nullptr)
, mUserJob(nullptr)
{
}
......
......@@ -37,12 +37,7 @@ class KSieveUi::ManageSieveScriptsDialogPrivate
{
public:
ManageSieveScriptsDialogPrivate()
: mSieveEditor(nullptr)
, mNewScript(nullptr)
, mEditScript(nullptr)
, mDeleteScript(nullptr)
, mDeactivateScript(nullptr)
, mIsNewScript(false)
: mIsNewScript(false)
, mWasActive(false)
{
}
......
......@@ -20,8 +20,7 @@ XMLPrintingScriptBuilder::XMLPrintingScriptBuilder(int indent)
}
XMLPrintingScriptBuilder::XMLPrintingScriptBuilder()
: KSieve::ScriptBuilder(),
mStream(nullptr)
: KSieve::ScriptBuilder()
{
initialize();
}
......
......@@ -9,8 +9,6 @@
using namespace KSieveUi::Legacy;
KSieveUi::Legacy::VacationDataExtractor::VacationDataExtractor()
: KSieve::ScriptBuilder()
, mContext(None)
, mNotificationInterval(0)
{
qCDebug(LIBKSIEVE_LOG);
}
......
......@@ -324,8 +324,8 @@ private:
void stringListArgumentEnd() override;
private:
Context mContext;
int mNotificationInterval;
Context mContext = None;
int mNotificationInterval = 0;
QString mMessageText;
QString mSubject;
QStringList mAliases;
......
......@@ -44,7 +44,7 @@ private Q_SLOTS:
private:
Q_DISABLE_COPY(MultiImapVacationManager)
SieveImapPasswordProvider *mPasswordProvider = nullptr;
SieveImapPasswordProvider *const mPasswordProvider;
int mNumberOfJobs = 0;
bool mCheckInProgress = false;
......
......@@ -24,7 +24,7 @@ public:
{
}
QWidget *mWidget = nullptr;
QWidget *const mWidget;
QPointer<KSieveUi::MultiImapVacationDialog> mMultiImapVacationDialog = nullptr;
QPointer<KSieveUi::MultiImapVacationManager> mCheckVacation = nullptr;
bool mQuestionAsked = false;
......
......@@ -22,7 +22,7 @@ protected:
bool refreshList() override;
private:
SieveImapPasswordProvider *mPasswordProvider = nullptr;
SieveImapPasswordProvider *const mPasswordProvider;
};
}
......
......@@ -54,7 +54,7 @@ private:
int mProgressCount = 0;
KPixmapSequence mProgressPix;
QTimer *mProgressTimer = nullptr;
SieveTreeWidgetItem *mItem = nullptr;
SieveTreeWidgetItem *const mItem;
};
}
......
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