Commit 3e98df68 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Modernize code

parent 97ce3e19
Pipeline #33574 passed with stage
in 15 minutes and 51 seconds
......@@ -19,9 +19,7 @@ namespace KAlarmCal
class Q_DECL_HIDDEN EventAttribute::Private
{
public:
Private() : mCommandError(KAEvent::CMD_NO_ERROR) {}
KAEvent::CmdErrType mCommandError; // the last command execution error for the alarm
KAEvent::CmdErrType mCommandError = KAEvent::CMD_NO_ERROR; // the last command execution error for the alarm
};
EventAttribute::EventAttribute()
......
......@@ -71,10 +71,9 @@ KALARMCAL_EXPORT int KADateTime_zoneCacheHit = 0;
class KADateTimeSpecPrivate
{
public:
KADateTimeSpecPrivate() : utcOffset(0) {}
// *** NOTE: This structure is replicated in KADateTimePrivate. Any changes must be copied there.
QTimeZone tz; // if type == TimeZone, the instance's time zone.
int utcOffset; // if type == OffsetFromUTC, the offset from UTC
int utcOffset = 0; // if type == OffsetFromUTC, the offset from UTC
KADateTime::SpecType type; // time spec type
};
......
......@@ -35,10 +35,9 @@ public:
class Q_DECL_HIDDEN KARecurrence::Private
{
public:
Private()
: mFeb29Type(Feb29_None), mCachedType(-1) {}
Private() {}
explicit Private(const Recurrence &r)
: mRecurrence(r), mFeb29Type(Feb29_None), mCachedType(-1) {}
: mRecurrence(r) {}
void clear()
{
mRecurrence.clear();
......@@ -55,8 +54,8 @@ public:
static Feb29Type mDefaultFeb29;
Recurrence_p mRecurrence;
Feb29Type mFeb29Type; // yearly recurrence on Feb 29th (leap years) / Mar 1st (non-leap years)
mutable int mCachedType;
Feb29Type mFeb29Type = Feb29_None; // yearly recurrence on Feb 29th (leap years) / Mar 1st (non-leap years)
mutable int mCachedType = -1;
};
QTimeZone KARecurrence::Private::toTimeZone(const KADateTime::Spec &spec)
......
......@@ -17,7 +17,7 @@ namespace KAlarmCal
class Q_DECL_HIDDEN Repetition::Private
{
public:
Private() : mInterval(0), mCount(0) {}
Private() {}
Private(const Duration &interval, int count)
: mInterval(interval), mCount(count)
{
......@@ -27,8 +27,8 @@ public:
}
}
Duration mInterval; // sub-repetition interval
int mCount; // sub-repetition count (excluding the first time)
Duration mInterval = 0; // sub-repetition interval
int mCount = 0; // sub-repetition count (excluding the first time)
};
Repetition::Repetition()
......
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