Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 719c0eb8 authored by Allen Winter's avatar Allen Winter

autotests/various - remove duplicate includes

parent fa54890c
......@@ -27,7 +27,6 @@
#include <itemcreatejob.h>
#include <collectionfetchjob.h>
#include <collectionfetchscope.h>
#include <itemcreatejob.h>
using namespace Akonadi;
using namespace KCalCore;
......@@ -38,7 +37,7 @@ static bool compareUids(const QStringList &_uids, const Incidence::List &inciden
{
QStringList uids = _uids;
for(const KCalCore::Incidence::Ptr &incidence : incidences) {
for (const KCalCore::Incidence::Ptr &incidence : incidences) {
if (uids.contains(incidence->uid()))
uids.removeAll(incidence->uid());
}
......@@ -145,7 +144,7 @@ void CalendarBaseTest::cleanupTestCase()
void CalendarBaseTest::testItem()
{
foreach(const QString &uid, mUids) {
foreach (const QString &uid, mUids) {
const Item item1 = mCalendar->item(uid);
const Item item2 = mCalendar->item(item1.id());
QVERIFY(item1.isValid());
......@@ -165,8 +164,8 @@ void CalendarBaseTest::testChildIncidences_data()
QTest::newRow("Invalid parent") << "doesnt exist" << Item::Id(404) << QStringList();
Item::Id id = createTodo(tr("parent1"));
QVERIFY(id > -1);
QVERIFY(createTodo(tr("child1"), tr("parent1")) > -1);
QVERIFY(createTodo(tr("child2"), tr("parent1")) > -1);
QVERIFY(createTodo(tr("child1"), tr("parent1")) > -1);
QVERIFY(createTodo(tr("child2"), tr("parent1")) > -1);
QTest::newRow("2 childs") << "parent1"
<< id << (QStringList() << tr("child1") << tr("child2"));
}
......@@ -255,19 +254,20 @@ void CalendarBaseTest::testDeleteAll()
}
*/
void CalendarBaseTest::handleCreateFinished(bool success, const QString &errorString)
{
if (!success)
if (!success) {
qDebug() << "handleCreateFinished(): " << errorString;
}
QCOMPARE(success, mExpectedSlotResult);
QTestEventLoop::instance().exitLoop();
}
void CalendarBaseTest::handleDeleteFinished(bool success, const QString &errorString)
{
if (!success)
if (!success) {
qDebug() << "handleDeleteFinished(): " << errorString;
}
QCOMPARE(success, mExpectedSlotResult);
QTestEventLoop::instance().exitLoop();
}
......
......@@ -27,7 +27,6 @@
#include <collectionfetchjob.h>
#include <collectionfetchscope.h>
#include <collectionmodifyjob.h>
#include <itemdeletejob.h>
#include <itemmodifyjob.h>
#include <KCheckableProxyModel>
#include <KEMailSettings>
......@@ -40,7 +39,6 @@ using namespace KCalCore;
Q_DECLARE_METATYPE(QSet<QByteArray>)
KCalCore::Incidence::Ptr Akonadi::CalendarUtils::incidence(const Akonadi::Item &item)
{
// With this try-catch block, we get a 2x performance improvement in retrieving the payload
......@@ -262,7 +260,6 @@ void ETMCalendarTest::testSelectCollection()
}
}
void ETMCalendarTest::calendarIncidenceAdded(const Incidence::Ptr &incidence)
{
Q_ASSERT(incidence);
......@@ -307,7 +304,7 @@ void ETMCalendarTest::calendarIncidenceChanged(const Incidence::Ptr &incidence)
checkExitLoop();
}
void ETMCalendarTest::calendarIncidenceDeleted(const Incidence::Ptr &incidence, const KCalCore::Calendar* cal)
void ETMCalendarTest::calendarIncidenceDeleted(const Incidence::Ptr &incidence, const KCalCore::Calendar *cal)
{
Q_UNUSED(cal);
const QString id = incidence->customProperty("VOLATILE", "AKONADI-ID");
......@@ -510,7 +507,6 @@ void ETMCalendarTest::testItem()
// The pointers should be the same
QCOMPARE(incidence1.data(), incidence2.data());
QCOMPARE(incidence.data(), incidence1.data());
}
void ETMCalendarTest::testShareETM()
......@@ -582,7 +578,7 @@ void ETMCalendarTest::testFilterInvitationsChanged()
item.setPayload<KCalCore::Incidence::Ptr>(incidence);
mIncidencesToDelete = 1;
ItemModifyJob *modifyJob = new ItemModifyJob(item, this);
ItemModifyJob *modifyJob = new ItemModifyJob(item, this);
AKVERIFYEXEC(modifyJob);
waitForIt();
QCOMPARE(mCalendar->model()->rowCount(), anz);
......@@ -596,13 +592,12 @@ void ETMCalendarTest::testFilterInvitationsChanged()
item.setPayload<KCalCore::Incidence::Ptr>(incidence);
item.setRevision(2);
mIncidencesToAdd = 1;
modifyJob = new ItemModifyJob(item, this);
modifyJob = new ItemModifyJob(item, this);
AKVERIFYEXEC(modifyJob);
waitForIt();
QCOMPARE(mCalendar->model()->rowCount(), anz+1);
}
void ETMCalendarTest::waitForIt()
{
QTestEventLoop::instance().enterLoop(10);
......
......@@ -25,7 +25,6 @@
#include <qtest_akonadi.h>
#include <item.h>
#include <collection.h>
#include <itemfetchjob.h>
#include <itemcreatejob.h>
#include <itemfetchscope.h>
......@@ -534,7 +533,6 @@ private Q_SLOTS:
event->setSummary(QStringLiteral("summary"));
QTest::newRow("attendee:summary") << item2 << event << false;
}
}
void testModifyRescedule()
......
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