Commit 2ba36d8e authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add missing explicit keyword + add nullptr

parent a3bfec46
......@@ -22,7 +22,7 @@ public:
};
Q_ENUM(AgentStatuses);
AgentConfiguration(QObject *parent = nullptr);
explicit AgentConfiguration(QObject *parent = nullptr);
~AgentConfiguration() override;
Akonadi::AgentFilterProxyModel *availableAgents();
......
......@@ -51,7 +51,7 @@ class CalendarManager : public QObject
Q_PROPERTY(QVariantMap undoRedoData READ undoRedoData NOTIFY undoRedoDataChanged)
public:
CalendarManager(QObject *parent = nullptr);
explicit CalendarManager(QObject *parent = nullptr);
~CalendarManager() override;
KCheckableProxyModel *collectionSelectionProxyModel() const;
......@@ -113,8 +113,8 @@ Q_SIGNALS:
private:
Akonadi::ETMCalendar::Ptr m_calendar = nullptr;
Akonadi::IncidenceChanger *m_changer;
KDescendantsProxyModel *m_flatCollectionTreeModel;
Akonadi::IncidenceChanger *m_changer = nullptr;
KDescendantsProxyModel *m_flatCollectionTreeModel = nullptr;
ColorProxyModel *m_baseModel = nullptr;
KCheckableProxyModel *m_selectionProxyModel = nullptr;
Akonadi::ETMViewStateSaver *mCollectionSelectionModelStateSaver = nullptr;
......
......@@ -28,7 +28,7 @@ class ContactsManager : public QObject
Q_PROPERTY(QSortFilterProxyModel *contactsModel READ contactsModel CONSTANT)
public:
ContactsManager(QObject *parent = nullptr);
explicit ContactsManager(QObject *parent = nullptr);
~ContactsManager() override = default;
QSortFilterProxyModel *contactsModel();
......
......@@ -97,7 +97,7 @@ public:
};
Q_ENUM(RecurrenceActions)
IncidenceWrapper(QObject *parent = nullptr);
explicit IncidenceWrapper(QObject *parent = nullptr);
~IncidenceWrapper() override;
void notifyDataChanged();
......
......@@ -14,7 +14,7 @@ class KalCommandBarModel final : public QAbstractTableModel
public:
struct Item {
QString groupName;
QAction *action;
QAction *action = nullptr;
int score;
};
......@@ -28,7 +28,7 @@ public:
QList<QAction *> actions;
};
KalCommandBarModel(QObject *parent = nullptr);
explicit KalCommandBarModel(QObject *parent = nullptr);
enum Role {
Score = Qt::UserRole + 1,
......
......@@ -20,7 +20,7 @@ public:
};
Q_ENUM(Roles);
AttendeeStatusModel(QObject *parent = nullptr);
explicit AttendeeStatusModel(QObject *parent = nullptr);
~AttendeeStatusModel() override = default;
QVariant data(const QModelIndex &idx, int role) const override;
......
......@@ -8,7 +8,7 @@ class CommandBarFilterModel final : public QSortFilterProxyModel
Q_OBJECT
Q_PROPERTY(QString filterString READ filterString WRITE setFilterString NOTIFY filterStringChanged)
public:
CommandBarFilterModel(QObject *parent = nullptr);
explicit CommandBarFilterModel(QObject *parent = nullptr);
QString filterString() const;
......
......@@ -42,7 +42,7 @@ public:
PeriodStartDateTime,
};
HourlyIncidenceModel(QObject *parent = nullptr);
explicit HourlyIncidenceModel(QObject *parent = nullptr);
~HourlyIncidenceModel() override = default;
QModelIndex index(int row, int column, const QModelIndex &parent = {}) const override;
......@@ -74,7 +74,7 @@ private:
IncidenceOccurrenceModel *mSourceModel{nullptr};
int mPeriodLength{15}; // In minutes
HourlyIncidenceModel::Filters m_filters;
KalendarConfig *m_config;
KalendarConfig *m_config = nullptr;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(HourlyIncidenceModel::Filters)
......@@ -74,7 +74,7 @@ public:
LastRole
};
Q_ENUM(Roles);
IncidenceOccurrenceModel(QObject *parent = nullptr);
explicit IncidenceOccurrenceModel(QObject *parent = nullptr);
~IncidenceOccurrenceModel() override = default;
int rowCount(const QModelIndex &parent = {}) const override;
......
......@@ -18,7 +18,7 @@ public:
};
Q_ENUM(Roles);
ItemTagsModel(QObject *parent = nullptr);
explicit ItemTagsModel(QObject *parent = nullptr);
~ItemTagsModel() override = default;
QVariant data(const QModelIndex &idx, int role) const override;
......
......@@ -47,7 +47,7 @@ public:
PeriodStartDate,
};
MultiDayIncidenceModel(QObject *parent = nullptr);
explicit MultiDayIncidenceModel(QObject *parent = nullptr);
~MultiDayIncidenceModel() override = default;
QModelIndex index(int row, int column, const QModelIndex &parent = {}) const override;
......@@ -85,7 +85,7 @@ private:
IncidenceOccurrenceModel *mSourceModel{nullptr};
int mPeriodLength{7};
MultiDayIncidenceModel::Filters m_filters;
KalendarConfig *m_config;
KalendarConfig *m_config = nullptr;
};
Q_DECLARE_OPERATORS_FOR_FLAGS(MultiDayIncidenceModel::Filters)
......@@ -14,7 +14,7 @@ public:
enum Roles { IdRole = Qt::UserRole + 1 };
Q_ENUM(Roles);
TimeZoneListModel(QObject *parent = nullptr);
explicit TimeZoneListModel(QObject *parent = nullptr);
~TimeZoneListModel() override = default;
QVariant data(const QModelIndex &idx, int role) const override;
......
......@@ -87,7 +87,7 @@ public:
};
Q_ENUM(ShowComplete);
TodoSortFilterProxyModel(QObject *parent = nullptr);
explicit TodoSortFilterProxyModel(QObject *parent = nullptr);
~TodoSortFilterProxyModel();
int columnCount(const QModelIndex &parent) const override;
......
......@@ -14,7 +14,7 @@ class TagManager : public QObject
Q_PROPERTY(QSortFilterProxyModel *tagModel READ tagModel NOTIFY tagModelChanged)
public:
TagManager(QObject *parent = nullptr);
explicit TagManager(QObject *parent = nullptr);
~TagManager() override = default;
QSortFilterProxyModel *tagModel();
......
Supports Markdown
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