Commit 288beac2 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Const'ify variable when possible

parent 27da7a56
Pipeline #33600 failed with stage
in 60 minutes and 8 seconds
......@@ -30,7 +30,7 @@ private Q_SLOTS:
private:
void createTodo();
Akonadi::Item mItem;
Akonadi::Collection mCollection;
const Akonadi::Collection mCollection;
KCalendarCore::Todo::Ptr mTodoPtr;
};
}
......
......@@ -30,9 +30,9 @@ protected:
QVector<CalendarEvents::EventData> explodeIncidenceOccurences(const CalendarEvents::EventData &ed, const KCalendarCore::Incidence::Ptr &incidence, bool &ok);
protected:
PimDataSource *mDataSource = nullptr;
QDate mStart;
QDate mEnd;
PimDataSource *const mDataSource;
const QDate mStart;
const QDate mEnd;
};
class EventDataVisitor : public BaseEventDataVisitor
......
......@@ -38,7 +38,7 @@ private:
void slotCurrentChanged(const QModelIndex &current, const QModelIndex &previous);
void slotRefreshImap();
KSieveUi::SieveImapAccountSettings mAccount;
const KSieveUi::SieveImapAccountSettings mAccount;
QLineEdit *mSearchLineEdit = nullptr;
SelectImapFolderTreeView *mTreeView = nullptr;
QStandardItemModel *mModel = nullptr;
......
......@@ -12,8 +12,8 @@
SelectImapLineEditCompleterModel::SelectImapLineEditCompleterModel(const KSieveUi::SieveImapAccountSettings &account, QObject *parent)
: QObject(parent)
, mFlatProxy(new KDescendantsProxyModel(this))
{
mFlatProxy = new KDescendantsProxyModel(this);
mFlatProxy->setDisplayAncestorData(true);
mFlatProxy->setAncestorSeparator(QStringLiteral("/"));
bool modelIsInitalized = false;
......
......@@ -20,9 +20,9 @@ public:
explicit SelectImapLineEditCompleterModel(const KSieveUi::SieveImapAccountSettings &account, QObject *parent = nullptr);
~SelectImapLineEditCompleterModel();
QAbstractProxyModel *completerModel() const;
Q_REQUIRED_RESULT QAbstractProxyModel *completerModel() const;
private:
KDescendantsProxyModel *mFlatProxy = nullptr;
KDescendantsProxyModel *const mFlatProxy;
};
#endif // SELECTIMAPLINEEDITCOMPLETERMODEL_H
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