Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KDE PIM Runtime
Commits
d4e13598
Commit
d4e13598
authored
Oct 06, 2022
by
Laurent Montel
Browse files
const'ify variables
parent
49983d60
Pipeline
#242662
canceled with stage
in 4 minutes and 45 seconds
Changes
13
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
resources/kolab/pimkolab/calendaring/datetimeutils.cpp
View file @
d4e13598
...
...
@@ -12,7 +12,7 @@ namespace Kolab
{
namespace
DateTimeUtils
{
KOLAB_EXPORT
std
::
string
getLocalTimezone
()
std
::
string
getLocalTimezone
()
{
const
auto
tz
=
QTimeZone
::
systemTimeZoneId
();
return
tz
.
toStdString
();
...
...
resources/kolab/pimkolab/kolabformatV2/contact.cpp
View file @
d4e13598
...
...
@@ -45,7 +45,6 @@ Contact::Contact(const KContacts::Addressee *addr)
// loading (xml->addressee)
Contact
::
Contact
(
const
QString
&
xml
)
:
mHasGeo
(
false
)
{
load
(
xml
);
}
...
...
resources/kolab/pimkolab/kolabformatV2/contact.h
View file @
d4e13598
...
...
@@ -302,7 +302,7 @@ private:
QString
mPreferredAddress
;
float
mLatitude
;
float
mLongitude
;
bool
mHasGeo
;
bool
mHasGeo
=
false
;
struct
Custom
{
QString
app
;
QString
name
;
...
...
resources/kolab/pimkolab/kolabformatV2/distributionlist.cpp
View file @
d4e13598
...
...
@@ -53,7 +53,7 @@ void KolabV2::DistributionList::loadDistrListMember(const QDomElement &element)
}
if
(
n
.
isElement
())
{
QDomElement
e
=
n
.
toElement
();
QString
tagName
=
e
.
tagName
();
const
QString
tagName
=
e
.
tagName
();
if
(
tagName
==
QLatin1String
(
"display-name"
))
{
member
.
displayName
=
e
.
text
();
}
else
if
(
tagName
==
QLatin1String
(
"smtp-address"
))
{
...
...
resources/kolab/pimkolab/kolabformatV2/incidence.cpp
View file @
d4e13598
...
...
@@ -21,9 +21,6 @@ using namespace KolabV2;
Incidence
::
Incidence
(
const
QString
&
tz
,
const
KCalendarCore
::
Incidence
::
Ptr
&
incidence
)
:
KolabBase
(
tz
)
,
mFloatingStatus
(
Unset
)
,
mHasAlarm
(
false
)
,
mPriority
(
0
)
{
Q_UNUSED
(
incidence
)
}
...
...
@@ -153,7 +150,7 @@ bool Incidence::loadAttendeeAttribute(QDomElement &element, Attendee &attendee)
}
if
(
n
.
isElement
())
{
QDomElement
e
=
n
.
toElement
();
QString
tagName
=
e
.
tagName
();
const
QString
tagName
=
e
.
tagName
();
if
(
tagName
==
QLatin1String
(
"display-name"
))
{
attendee
.
displayName
=
e
.
text
();
...
...
resources/kolab/pimkolab/kolabformatV2/incidence.h
View file @
d4e13598
...
...
@@ -135,9 +135,9 @@ protected:
QString
mLocation
;
Email
mOrganizer
;
QDateTime
mStartDate
;
FloatingStatus
mFloatingStatus
;
FloatingStatus
mFloatingStatus
=
Unset
;
float
mAlarm
=
0.0
;
bool
mHasAlarm
;
bool
mHasAlarm
=
false
;
Recurrence
mRecurrence
;
QList
<
Attendee
>
mAttendees
;
QList
<
KCalendarCore
::
Alarm
::
Ptr
>
mAlarms
;
...
...
@@ -152,6 +152,6 @@ protected:
// This is the KCal priority, not the Kolab priority.
// See kcalPriorityToKolab() and kolabPrioritytoKCal().
int
mPriority
;
int
mPriority
=
0
;
};
}
resources/kolab/pimkolab/kolabformatV2/journal.cpp
View file @
d4e13598
...
...
@@ -70,7 +70,7 @@ QDateTime Journal::endDate() const
bool
Journal
::
loadAttribute
(
QDomElement
&
element
)
{
QString
tagName
=
element
.
tagName
();
const
QString
tagName
=
element
.
tagName
();
if
(
tagName
==
QLatin1String
(
"summary"
))
{
setSummary
(
element
.
text
());
...
...
resources/kolab/pimkolab/kolabformatV2/kolabbase.cpp
View file @
d4e13598
...
...
@@ -20,8 +20,6 @@ KolabBase::KolabBase(const QString &tz)
:
mCreationDate
(
QDateTime
::
currentDateTime
())
,
mLastModified
(
QDateTime
::
currentDateTimeUtc
())
,
mSensitivity
(
Public
)
,
mHasPilotSyncId
(
false
)
,
mHasPilotSyncStatus
(
false
)
{
// unlike the previously used KTimeZone here, QTimeZone defaults to local time zone if tz.isEmpty()
// we therefore force it to invalid, which however is unsafe to use (unlike KTimeZone)
...
...
resources/kolab/pimkolab/kolabformatV2/kolabbase.h
View file @
d4e13598
...
...
@@ -151,7 +151,8 @@ protected:
QTimeZone
mTimeZone
;
// KPilot synchronization stuff
bool
mHasPilotSyncId
,
mHasPilotSyncStatus
;
bool
mHasPilotSyncId
=
false
;
bool
mHasPilotSyncStatus
=
false
;
unsigned
long
mPilotSyncId
;
int
mPilotSyncStatus
;
};
...
...
resources/kolab/pimkolab/kolabformatV2/note.cpp
View file @
d4e13598
...
...
@@ -29,7 +29,6 @@ QString Note::journalToXML(const KCalendarCore::Journal::Ptr &journal)
}
Note
::
Note
(
const
KCalendarCore
::
Journal
::
Ptr
&
journal
)
:
mRichText
(
false
)
{
if
(
journal
)
{
setFields
(
journal
);
...
...
@@ -80,7 +79,7 @@ bool Note::richText() const
bool
Note
::
loadAttribute
(
QDomElement
&
element
)
{
QString
tagName
=
element
.
tagName
();
const
QString
tagName
=
element
.
tagName
();
if
(
tagName
==
QLatin1String
(
"summary"
))
{
setSummary
(
element
.
text
());
}
else
if
(
tagName
==
QLatin1String
(
"foreground-color"
))
{
...
...
resources/kolab/pimkolab/kolabformatV2/note.h
View file @
d4e13598
...
...
@@ -80,6 +80,6 @@ protected:
QString
mSummary
;
QColor
mBackgroundColor
;
QColor
mForegroundColor
;
bool
mRichText
;
bool
mRichText
=
false
;
};
}
resources/kolab/pimkolab/kolabformatV2/task.cpp
View file @
d4e13598
...
...
@@ -31,9 +31,6 @@ Task::Task(const QString &tz, const KCalendarCore::Todo::Ptr &task)
:
Incidence
(
tz
,
task
)
,
mPercentCompleted
(
0
)
,
mStatus
(
KCalendarCore
::
Incidence
::
StatusNone
)
,
mHasStartDate
(
false
)
,
mHasDueDate
(
false
)
,
mHasCompletedDate
(
false
)
{
if
(
task
)
{
setFields
(
task
);
...
...
resources/kolab/pimkolab/kolabformatV2/task.h
View file @
d4e13598
...
...
@@ -94,12 +94,12 @@ protected:
KCalendarCore
::
Incidence
::
Status
mStatus
;
QString
mParent
;
bool
mHasStartDate
;
bool
mHasStartDate
=
false
;
bool
mHasDueDate
;
bool
mHasDueDate
=
false
;
QDateTime
mDueDate
;
bool
mHasCompletedDate
;
bool
mHasCompletedDate
=
false
;
QDateTime
mCompletedDate
;
};
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment