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

Modernize code

parent 7e4892e9
Pipeline #33167 passed with stage
in 21 minutes and 41 seconds
......@@ -58,8 +58,8 @@ public:
int todayColumn() const;
public:
EventView *mEventView = nullptr;
Agenda *mAgenda = nullptr;
EventView *const mEventView;
Agenda *const mAgenda;
QTimer *mTimer = nullptr;
QLabel *mTimeBox = nullptr; // Label showing the current time
QDateTime mOldDateTime;
......
......@@ -274,8 +274,8 @@ private:
MultiViewCalendar::Ptr mCalendar;
KCalendarCore::Incidence::Ptr mIncidence;
QDateTime mOccurrenceDateTime;
bool mValid;
bool mCloned;
bool mValid = true;
bool mCloned = false;
QString mLabelText;
bool mSelected;
bool mIconAlarm, mIconRecur, mIconReadonly;
......
......@@ -97,7 +97,7 @@ public:
}
public:
int mColumns;
int mColumns = 1;
Location mLocation;
QPixmap mPixmap;
QVector<bool> mEnabled;
......
......@@ -10,7 +10,6 @@ using namespace EventViews;
AlternateLabel::AlternateLabel(const QString &shortlabel, const QString &longlabel, const QString &extensivelabel, QWidget *parent)
: QLabel(parent)
, mTextTypeFixed(false)
, mShortText(shortlabel)
, mLongText(longlabel)
, mExtensiveText(extensivelabel)
......
......@@ -27,9 +27,6 @@ using namespace KCalendarCore;
MonthItem::MonthItem(MonthScene *monthScene)
: mMonthScene(monthScene)
, mSelected(false)
, mMoving(false)
, mResizing(false)
{
}
......
......@@ -256,9 +256,9 @@ private:
MonthScene *mMonthScene = nullptr;
bool mSelected;
bool mMoving; // during move
bool mResizing; // during resize
bool mSelected = false;
bool mMoving = false; // during move
bool mResizing = false; // during resize
QDate mOverrideStartDate;
int mOverrideDaySpan;
......
......@@ -33,7 +33,7 @@ using namespace EventViews;
namespace EventViews {
class MonthViewPrivate : public Akonadi::ETMCalendar::CalendarObserver
{
MonthView *q;
MonthView *const q;
public: /// Methods
explicit MonthViewPrivate(MonthView *qq);
......
......@@ -118,7 +118,7 @@ public:
void setupViews();
void resizeScrollView(const QSize &size);
MultiAgendaView *q;
MultiAgendaView *const q;
QList<AgendaView *> mAgendaViews;
QList<QWidget *> mAgendaWidgets;
QWidget *mTopBox = nullptr;
......@@ -130,9 +130,9 @@ public:
QWidget *mLeftBottomSpacer = nullptr;
QWidget *mRightBottomSpacer = nullptr;
QDate mStartDate, mEndDate;
bool mUpdateOnShow;
bool mPendingChanges;
bool mCustomColumnSetupUsed;
bool mUpdateOnShow = true;
bool mPendingChanges = true;
bool mCustomColumnSetupUsed = false;
QVector<KCheckableProxyModel *> mCollectionSelectionModels;
QStringList mCustomColumnTitles;
int mCustomNumberOfColumns;
......
......@@ -92,7 +92,7 @@ private Q_SLOTS:
void onLayoutAboutToBeChanged();
void onLayoutChanged();
private:
IncidenceTreeModel *q;
IncidenceTreeModel *const q;
};
#endif
......@@ -19,8 +19,6 @@
TodoViewView::TodoViewView(QWidget *parent)
: QTreeView(parent)
, mHeaderPopup(nullptr)
, mIgnoreNextMouseRelease(false)
{
header()->installEventFilter(this);
setAlternatingRowColors(true);
......
......@@ -37,7 +37,7 @@ private:
QMenu *mHeaderPopup = nullptr;
QList<QAction *> mColumnActions;
QTimer mExpandTimer;
bool mIgnoreNextMouseRelease;
bool mIgnoreNextMouseRelease = false;
Q_SIGNALS:
void visibleColumnCountChanged();
......
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