aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-11-14 21:54:38 (GMT)
committerMontel Laurent <montel@kde.org>2016-11-14 21:54:38 (GMT)
commit3223fb244447ed4afde75fc2ff619f25a68a5482 (patch)
treef442da256dfa8cbea74eb795ddb7cc700056644b
parentbe93bc882177ec7ac78929aab00ca9c308e5ad64 (diff)
Fix some clazy warningv16.11.80
-rw-r--r--autotests/incidencechangertest.cpp14
-rw-r--r--src/calendarbase.cpp2
-rw-r--r--src/calendarbase.h2
3 files changed, 9 insertions, 9 deletions
diff --git a/autotests/incidencechangertest.cpp b/autotests/incidencechangertest.cpp
index 34e3e45..f4767d2 100644
--- a/autotests/incidencechangertest.cpp
+++ b/autotests/incidencechangertest.cpp
@@ -366,7 +366,7 @@ private Q_SLOTS:
fetchJob->fetchScope().fetchFullPayload();
AKVERIFYEXEC(fetchJob);
QVERIFY(fetchJob->items().count() == 1);
- Item fetchedItem = fetchJob->items().first();
+ Item fetchedItem = fetchJob->items().constFirst();
QVERIFY(fetchedItem.isValid());
QVERIFY(fetchedItem.hasPayload<KCalCore::Incidence::Ptr>());
Incidence::Ptr incidence = fetchedItem.payload<KCalCore::Incidence::Ptr>();
@@ -409,7 +409,7 @@ private Q_SLOTS:
fetchJob->fetchScope().fetchFullPayload();
AKVERIFYEXEC(fetchJob);
QVERIFY(fetchJob->items().count() == 1);
- Item fetchedItem = fetchJob->items().first();
+ Item fetchedItem = fetchJob->items().constFirst();
QVERIFY(fetchedItem.isValid());
QVERIFY(fetchedItem.hasPayload<KCalCore::Incidence::Ptr>());
Incidence::Ptr incidence2 = fetchedItem.payload<KCalCore::Incidence::Ptr>();
@@ -563,7 +563,7 @@ private Q_SLOTS:
fetchJob->fetchScope().fetchFullPayload();
AKVERIFYEXEC(fetchJob);
QVERIFY(fetchJob->items().count() == 1);
- Item fetchedItem = fetchJob->items().first();
+ Item fetchedItem = fetchJob->items().constFirst();
QVERIFY(fetchedItem.isValid());
QVERIFY(fetchedItem.hasPayload<KCalCore::Event::Ptr>());
@@ -1026,11 +1026,11 @@ private Q_SLOTS:
fJob->fetchScope().fetchFullPayload();
AKVERIFYEXEC(fJob);
QCOMPARE(fJob->items().count(), 1);
- QVERIFY(fJob->items().first().isValid());
- QVERIFY(fJob->items().first().hasPayload());
- QVERIFY(fJob->items().first().hasPayload<KCalCore::Incidence::Ptr>());
+ QVERIFY(fJob->items().constFirst().isValid());
+ QVERIFY(fJob->items().constFirst().hasPayload());
+ QVERIFY(fJob->items().constFirst().hasPayload<KCalCore::Incidence::Ptr>());
QCOMPARE(item.payload<KCalCore::Incidence::Ptr>()->uid(),
- fJob->items().first().payload<KCalCore::Incidence::Ptr>()->uid());
+ fJob->items().constFirst().payload<KCalCore::Incidence::Ptr>()->uid());
}
break;
case IncidenceChanger::ChangeTypeDelete:
diff --git a/src/calendarbase.cpp b/src/calendarbase.cpp
index 3005a31..eca9a5f 100644
--- a/src/calendarbase.cpp
+++ b/src/calendarbase.cpp
@@ -502,7 +502,7 @@ Akonadi::Item::List CalendarBase::itemList(const KCalCore::Incidence::List &inci
return items;
}
-KCalCore::Incidence::List CalendarBase::childIncidences(const Akonadi::Item::Id &parentId) const
+KCalCore::Incidence::List CalendarBase::childIncidences(Akonadi::Item::Id parentId) const
{
Q_D(const CalendarBase);
KCalCore::Incidence::List childs;
diff --git a/src/calendarbase.h b/src/calendarbase.h
index 1f2167f..da50ee4 100644
--- a/src/calendarbase.h
+++ b/src/calendarbase.h
@@ -105,7 +105,7 @@ public:
* Only the direct childs are returned
* @param parentId identifier of the parent item
*/
- KCalCore::Incidence::List childIncidences(const Akonadi::Item::Id &parentId) const;
+ KCalCore::Incidence::List childIncidences(Item::Id parentId) const;
/**
* Returns the child items of the parent identified by @p parentUid.