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