Commit c0374c31 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Continue to modernize code

parent 7bdce0f3
Pipeline #33567 passed with stage
in 18 minutes and 18 seconds
......@@ -22,15 +22,8 @@ using namespace EventViews;
EventViewPrivate::EventViewPrivate()
: calendar(nullptr)
, customCollectionSelection(nullptr)
, collectionSelectionModel(nullptr)
, mReturnPressed(false)
, mDateRangeSelectionEnabled(true)
, mTypeAhead(false)
, mTypeAheadReceiver(nullptr)
, mPrefs(new Prefs())
, mKCalPrefs(new CalendarSupport::KCalPrefs())
, mChanger(nullptr)
, mChanges(EventView::DatesChanged)
, mCollectionId(-1)
{
......
......@@ -38,8 +38,8 @@ public: // virtual functions
public: /// Members
Akonadi::ETMCalendar::Ptr calendar;
CalendarSupport::CollectionSelection *customCollectionSelection;
KCheckableProxyModel *collectionSelectionModel;
CalendarSupport::CollectionSelection *customCollectionSelection = nullptr;
KCheckableProxyModel *collectionSelectionModel = nullptr;
QByteArray identifier;
QDateTime startDateTime;
......@@ -51,9 +51,9 @@ public: /// Members
* we will only show a new event dialog if we previously received a
* key_Return press, otherwise a new event dialog appears when
* you hit return in some yes/no dialog */
bool mReturnPressed;
bool mDateRangeSelectionEnabled;
bool mTypeAhead;
bool mReturnPressed = false;
bool mDateRangeSelectionEnabled = true;
bool mTypeAhead = false;
QObject *mTypeAheadReceiver = nullptr;
QList<QEvent *> mTypeAheadEvents;
static CalendarSupport::CollectionSelection *sGlobalCollectionSelection;
......
......@@ -93,16 +93,12 @@ private:
void paintEvent(QPaintEvent *event) override;
private:
QString mText;
const QString mText;
};
public:
Private(MultiAgendaView *qq)
: q(qq)
, mUpdateOnShow(true)
, mPendingChanges(true)
, mCustomColumnSetupUsed(false)
, mCustomNumberOfColumns(2)
{
}
......@@ -135,7 +131,7 @@ public:
bool mCustomColumnSetupUsed = false;
QVector<KCheckableProxyModel *> mCollectionSelectionModels;
QStringList mCustomColumnTitles;
int mCustomNumberOfColumns;
int mCustomNumberOfColumns = 2;
QLabel *mLabel = nullptr;
QWidget *mRightDummyWidget = nullptr;
QHash<QString, KViewStateMaintainer<ETMViewStateSaver> * > mSelectionSavers;
......
......@@ -38,9 +38,9 @@ public:
private:
Akonadi::ETMCalendar::Ptr mCalendar;
QMap<Akonadi::Item::Id, QList<QStandardItem *> > mItemMap;
QStandardItemModel *mModel = nullptr;
QStandardItemModel *const mModel;
QColor mColor;
uint mIndex;
const uint mIndex;
};
class TimelineSubItem : public QStandardItem
......
......@@ -54,7 +54,6 @@ static bool isDueToday(const KCalendarCore::Todo::Ptr &todo)
}
TodoModel::Private::Private(const EventViews::PrefsPtr &preferences, TodoModel *qq) : QObject()
, m_changer(nullptr)
, m_preferences(preferences)
, q(qq)
{
......
......@@ -55,8 +55,6 @@ public:
: todoModel(new TodoModel(preferences))
, parent(parent_)
, calendar(nullptr)
, todoTreeModel(nullptr)
, todoFlatModel(nullptr)
, prefs(preferences)
{
}
......
......@@ -15,7 +15,6 @@
TodoViewSortFilterProxyModel::TodoViewSortFilterProxyModel(const EventViews::PrefsPtr &prefs, QObject *parent)
: QSortFilterProxyModel(parent)
, mSortOrder(Qt::AscendingOrder)
, mPreferences(prefs)
{
}
......
......@@ -48,7 +48,7 @@ private:
int compareCompletion(const QModelIndex &left, const QModelIndex &right) const;
QStringList mCategories;
QStringList mPriorities;
Qt::SortOrder mSortOrder;
Qt::SortOrder mSortOrder = Qt::AscendingOrder;
EventViews::PrefsPtr mPreferences;
};
......
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