diff options
| author | Montel Laurent <montel@kde.org> | 2017-07-06 17:49:33 (GMT) |
|---|---|---|
| committer | Montel Laurent <montel@kde.org> | 2017-07-06 17:49:33 (GMT) |
| commit | bfe272684cf8094a5bcc4a6115918de38619ebb4 (patch) | |
| tree | 3a2463fd2466deba1f33bb9319bf18afe99fc6dc | |
| parent | 241c12f6fcd75177cd26731a4dbb101dbcc1f23b (diff) | |
U§se QByteArrayLiteral, use const'ref, minor optimization
| -rw-r--r-- | src/compat.cpp | 4 | ||||
| -rw-r--r-- | src/event.cpp | 2 | ||||
| -rw-r--r-- | src/freebusy.cpp | 2 | ||||
| -rw-r--r-- | src/journal.cpp | 2 | ||||
| -rw-r--r-- | src/recurrence.cpp | 2 | ||||
| -rw-r--r-- | src/recurrence.h | 2 | ||||
| -rw-r--r-- | src/todo.cpp | 2 |
7 files changed, 8 insertions, 8 deletions
diff --git a/src/compat.cpp b/src/compat.cpp index e827531..678f57f 100644 --- a/src/compat.cpp +++ b/src/compat.cpp @@ -366,8 +366,8 @@ void CompatOutlook9::fixAlarms(const Incidence::Ptr &incidence) return; } Alarm::List alarms = incidence->alarms(); - Alarm::List::Iterator it; - for (it = alarms.begin(); it != alarms.end(); ++it) { + Alarm::List::Iterator end(alarms.end()); + for (Alarm::List::Iterator it = alarms.begin(); it != end; ++it) { Alarm::Ptr al = *it; if (al && al->hasStartOffset()) { Duration offsetDuration = al->startOffset(); diff --git a/src/event.cpp b/src/event.cpp index 6b21451..b67f215 100644 --- a/src/event.cpp +++ b/src/event.cpp @@ -122,7 +122,7 @@ Incidence::IncidenceType Event::type() const QByteArray Event::typeStr() const { - return "Event"; + return QByteArrayLiteral("Event"); } void Event::setDtStart(const KDateTime &dt) diff --git a/src/freebusy.cpp b/src/freebusy.cpp index 343136a..69aa0cb 100644 --- a/src/freebusy.cpp +++ b/src/freebusy.cpp @@ -212,7 +212,7 @@ IncidenceBase::IncidenceType FreeBusy::type() const QByteArray FreeBusy::typeStr() const { - return "FreeBusy"; + return QByteArrayLiteral("FreeBusy"); } void FreeBusy::setDtStart(const KDateTime &start) diff --git a/src/journal.cpp b/src/journal.cpp index aebc8fe..c444ea5 100644 --- a/src/journal.cpp +++ b/src/journal.cpp @@ -51,7 +51,7 @@ Incidence::IncidenceType Journal::type() const QByteArray Journal::typeStr() const { - return "Journal"; + return QByteArrayLiteral("Journal"); } Journal *Journal::clone() const diff --git a/src/recurrence.cpp b/src/recurrence.cpp index 5c52295..dadc97e 100644 --- a/src/recurrence.cpp +++ b/src/recurrence.cpp @@ -944,7 +944,7 @@ void Recurrence::addYearlyPos(short pos, const QBitArray &days) addMonthlyPos(pos, days); } -void Recurrence::setYearlyPos(QList<RecurrenceRule::WDayPos> &days) +void Recurrence::setYearlyPos(const QList<RecurrenceRule::WDayPos> &days) { setMonthlyPos(days); } diff --git a/src/recurrence.h b/src/recurrence.h index 9f3d260..d98965c 100644 --- a/src/recurrence.h +++ b/src/recurrence.h @@ -522,7 +522,7 @@ public: */ void addYearlyPos(short pos, const QBitArray &days); - void setYearlyPos(QList<RecurrenceRule::WDayPos> &days); + void setYearlyPos(const QList<RecurrenceRule::WDayPos> &days); /** Returns the day numbers within a yearly recurrence. * @return the days of the year for the event. E.g. if the list contains diff --git a/src/todo.cpp b/src/todo.cpp index 78f0322..c4e2b25 100644 --- a/src/todo.cpp +++ b/src/todo.cpp @@ -143,7 +143,7 @@ Incidence::IncidenceType Todo::type() const QByteArray Todo::typeStr() const { - return "Todo"; + return QByteArrayLiteral("Todo"); } void Todo::setDtDue(const KDateTime &dtDue, bool first) { |
