Commit e61223fc authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

run git clang-format

parent 0baf53a2
......@@ -9,11 +9,11 @@
#include "../src/calendarbase.h"
#include "../src/incidencechanger.h"
#include <qtest_akonadi.h>
#include <itemfetchjob.h>
#include <itemcreatejob.h>
#include <collectionfetchjob.h>
#include <collectionfetchscope.h>
#include <itemcreatejob.h>
#include <itemfetchjob.h>
#include <qtest_akonadi.h>
using namespace Akonadi;
using namespace KCalendarCore;
......@@ -40,9 +40,7 @@ static bool compareUids(const QStringList &_uids, const Incidence::List &inciden
void CalendarBaseTest::fetchCollection()
{
auto job = new CollectionFetchJob(Collection::root(),
CollectionFetchJob::Recursive,
this);
auto job = new CollectionFetchJob(Collection::root(), CollectionFetchJob::Recursive, this);
// Get list of collections
job->fetchScope().setContentMimeTypes(QStringList() << QStringLiteral("application/x-vnd.akonadi.calendar.event"));
AKVERIFYEXEC(job);
......@@ -117,11 +115,9 @@ void CalendarBaseTest::initTestCase()
mCalendar = new CalendarBase();
mCalendar->incidenceChanger()->setDestinationPolicy(IncidenceChanger::DestinationPolicyDefault);
mCalendar->incidenceChanger()->setDefaultCollection(mCollection);
connect(mCalendar, &CalendarBase::createFinished,
this, &CalendarBaseTest::handleCreateFinished);
connect(mCalendar, &CalendarBase::createFinished, this, &CalendarBaseTest::handleCreateFinished);
connect(mCalendar, &CalendarBase::deleteFinished,
this, &CalendarBaseTest::handleDeleteFinished);
connect(mCalendar, &CalendarBase::deleteFinished, this, &CalendarBaseTest::handleDeleteFinished);
createInitialIncidences();
}
......@@ -154,8 +150,7 @@ void CalendarBaseTest::testChildIncidences_data()
QVERIFY(id > -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"));
QTest::newRow("2 childs") << "parent1" << id << (QStringList() << tr("child1") << tr("child2"));
}
void CalendarBaseTest::testChildIncidences()
......@@ -170,7 +165,7 @@ void CalendarBaseTest::testChildIncidences()
}
void CalendarBaseTest::testDelete()
{ // No need for _data()
{ // No need for _data()
const Item event = mCalendar->item(mOneEventUid);
QVERIFY(event.isValid());
const Item todo = mCalendar->item(mOneTodoUid);
......@@ -271,7 +266,7 @@ Item::Id CalendarBaseTest::createTodo(const QString &uid, const QString &parentU
}
mCalendar->addTodo(todo);
QTestEventLoop::instance().enterLoop(5);
//QVERIFY( !QTestEventLoop::instance().timeout() );
// QVERIFY( !QTestEventLoop::instance().timeout() );
return mCalendar->item(uid).id();
}
......@@ -13,7 +13,8 @@
#include <QObject>
#include <QStringList>
namespace Akonadi {
namespace Akonadi
{
class CalendarBase;
}
......
......@@ -8,18 +8,18 @@
#include "../src/etmcalendar.h"
#include "../src/utils_p.h"
#include <itemcreatejob.h>
#include <itemdeletejob.h>
#include <qtest_akonadi.h>
#include <KCheckableProxyModel>
#include <KEMailSettings>
#include <collectionfetchjob.h>
#include <collectionfetchscope.h>
#include <collectionmodifyjob.h>
#include <itemcreatejob.h>
#include <itemdeletejob.h>
#include <itemmodifyjob.h>
#include <KCheckableProxyModel>
#include <KEMailSettings>
#include <qtest_akonadi.h>
#include <QTestEventLoop>
#include <QSignalSpy>
#include <QTestEventLoop>
using namespace Akonadi;
using namespace KCalendarCore;
......@@ -77,9 +77,7 @@ void ETMCalendarTest::deleteIncidence(const QString &uid)
void ETMCalendarTest::fetchCollection()
{
auto job = new CollectionFetchJob(Collection::root(),
CollectionFetchJob::Recursive,
this);
auto job = new CollectionFetchJob(Collection::root(), CollectionFetchJob::Recursive, this);
// Get list of collections
job->fetchScope().setContentMimeTypes(QStringList() << QStringLiteral("application/x-vnd.akonadi.calendar.event"));
AKVERIFYEXEC(job);
......@@ -92,20 +90,19 @@ void ETMCalendarTest::fetchCollection()
QVERIFY(mCollection.isValid());
}
void ETMCalendarTest:: initTestCase()
void ETMCalendarTest::initTestCase()
{
AkonadiTest::checkTestIsIsolated();
mIncidencesToAdd = 0;
mIncidencesToChange = 0;
mIncidencesToDelete = 0;
qRegisterMetaType<QSet<QByteArray> >("QSet<QByteArray>");
qRegisterMetaType<QSet<QByteArray>>("QSet<QByteArray>");
fetchCollection();
mCalendar = new ETMCalendar();
QVERIFY(!mCalendar->isLoaded());
connect(mCalendar, &ETMCalendar::collectionsAdded,
this, &ETMCalendarTest::handleCollectionsAdded);
connect(mCalendar, &ETMCalendar::collectionsAdded, this, &ETMCalendarTest::handleCollectionsAdded);
mCalendar->registerObserver(this);
......@@ -157,7 +154,7 @@ void ETMCalendarTest::testCollectionChanged()
QCOMPARE(spy.count(), 1);
QCOMPARE(spy.at(0).count(), 2);
QCOMPARE(spy.at(0).at(0).value<Akonadi::Collection>(), mCollection);
QVERIFY(spy.at(0).at(1).value<QSet<QByteArray> >().contains(QByteArray("AccessRights")));
QVERIFY(spy.at(0).at(1).value<QSet<QByteArray>>().contains(QByteArray("AccessRights")));
}
void ETMCalendarTest::testIncidencesAdded()
......@@ -224,7 +221,7 @@ void ETMCalendarTest::testUnselectCollection()
checkable->setData(firstIndex, Qt::Unchecked, Qt::CheckStateRole);
if (mIncidencesToDelete > 0) { // Actually they probably where deleted already
//doesn't need the event loop, but just in case
// doesn't need the event loop, but just in case
QTestEventLoop::instance().enterLoop(10);
if (QTestEventLoop::instance().timeout()) {
......@@ -555,7 +552,7 @@ void ETMCalendarTest::testFilterInvitationsChanged()
mIncidencesToAdd = 1;
createIncidence(uid);
waitForIt();
QCOMPARE(mCalendar->model()->rowCount(), anz+1);
QCOMPARE(mCalendar->model()->rowCount(), anz + 1);
Incidence::Ptr incidence = mCalendar->incidence(uid);
Item item = mCalendar->item(uid);
......@@ -582,7 +579,7 @@ void ETMCalendarTest::testFilterInvitationsChanged()
modifyJob = new ItemModifyJob(item, this);
AKVERIFYEXEC(modifyJob);
waitForIt();
QCOMPARE(mCalendar->model()->rowCount(), anz+1);
QCOMPARE(mCalendar->model()->rowCount(), anz + 1);
}
void ETMCalendarTest::waitForIt()
......@@ -593,7 +590,7 @@ void ETMCalendarTest::waitForIt()
void ETMCalendarTest::checkExitLoop()
{
//qDebug() << "checkExitLoop: current state: " << mIncidencesToDelete << mIncidencesToAdd << mIncidencesToChange;
// qDebug() << "checkExitLoop: current state: " << mIncidencesToDelete << mIncidencesToAdd << mIncidencesToChange;
if (mIncidencesToDelete == 0 && mIncidencesToAdd == 0 && mIncidencesToChange == 0) {
QTestEventLoop::instance().exitLoop();
}
......
......@@ -7,11 +7,12 @@
#ifndef ETMCALENDAR_TEST_H_
#define ETMCALENDAR_TEST_H_
#include <kcalendarcore/calendar.h>
#include <collection.h>
#include <QObject>
#include <collection.h>
#include <kcalendarcore/calendar.h>
namespace Akonadi {
namespace Akonadi
{
class ETMCalendar;
}
......@@ -47,7 +48,7 @@ public Q_SLOTS:
void handleCollectionsAdded(const Akonadi::Collection::List &collectionList);
private:
//quiet --overloaded-virtual warning
// quiet --overloaded-virtual warning
using KCalendarCore::Calendar::CalendarObserver::calendarIncidenceDeleted;
void deleteIncidence(const QString &uid);
......
......@@ -5,10 +5,10 @@
*/
#include "../src/fetchjobcalendar.h"
#include <itemfetchjob.h>
#include <itemcreatejob.h>
#include <collectionfetchjob.h>
#include <collectionfetchscope.h>
#include <itemcreatejob.h>
#include <itemfetchjob.h>
#include <qtest_akonadi.h>
using namespace Akonadi;
......@@ -34,9 +34,7 @@ class FetchJobCalendarTest : public QObject
void fetchCollection()
{
auto job = new CollectionFetchJob(Collection::root(),
CollectionFetchJob::Recursive,
this);
auto job = new CollectionFetchJob(Collection::root(), CollectionFetchJob::Recursive, this);
// Get list of collections
job->fetchScope().setContentMimeTypes(QStringList() << QStringLiteral("application/x-vnd.akonadi.calendar.event"));
AKVERIFYEXEC(job);
......
......@@ -6,9 +6,9 @@
#include "helper.h"
#include <itemfetchjob.h>
#include <collectionfetchjob.h>
#include <collectionfetchscope.h>
#include <itemfetchjob.h>
#include <QStringList>
......@@ -28,8 +28,7 @@ bool Helper::confirmDoesntExist(const Akonadi::Item &item)
Akonadi::Collection Helper::fetchCollection()
{
auto job = new CollectionFetchJob(Collection::root(),
CollectionFetchJob::Recursive);
auto job = new CollectionFetchJob(Collection::root(), CollectionFetchJob::Recursive);
// Get list of collections
job->fetchScope().setContentMimeTypes(QStringList() << QStringLiteral("application/x-vnd.akonadi.calendar.event"));
const bool ret = job->exec();
......
......@@ -10,7 +10,8 @@
#include <collection.h>
#include <item.h>
namespace Helper {
namespace Helper
{
bool confirmExists(const Akonadi::Item &item);
bool confirmDoesntExist(const Akonadi::Item &item);
Akonadi::Collection fetchCollection();
......
......@@ -7,13 +7,13 @@
#include "historytest.h"
#include "helper.h"
#include <itemfetchjob.h>
#include <itemcreatejob.h>
#include <KCalendarCore/Event>
#include <collectionfetchjob.h>
#include <collectionfetchscope.h>
#include <itemcreatejob.h>
#include <itemfetchjob.h>
#include <itemfetchscope.h>
#include <qtest_akonadi.h>
#include <KCalendarCore/Event>
#include <QTestEventLoop>
......@@ -31,7 +31,7 @@ static bool checkSummary(const Akonadi::Item &item, const QString &expected)
QVERIFY(job->exec());
QVERIFY(!job->items().isEmpty());
ok = true;
} ();
}();
if (!ok) {
return false;
}
......@@ -44,8 +44,7 @@ static bool checkSummary(const Akonadi::Item &item, const QString &expected)
if (it.payload<KCalendarCore::Incidence::Ptr>()->summary() == expected) {
return true;
} else {
qDebug() << "Got " << it.payload<KCalendarCore::Incidence::Ptr>()->summary()
<< "Expected " << expected;
qDebug() << "Got " << it.payload<KCalendarCore::Incidence::Ptr>()->summary() << "Expected " << expected;
return false;
}
}
......@@ -67,7 +66,7 @@ static Akonadi::Item createItem(const Akonadi::Collection &collection)
[&]() {
QVERIFY(createJob->exec());
QVERIFY(createJob->item().isValid());
} ();
}();
return createJob->item();
}
......@@ -78,23 +77,15 @@ void HistoryTest::initTestCase()
mHistory = mChanger->history();
connect(mChanger,
&IncidenceChanger::createFinished,
this, &HistoryTest::createFinished);
connect(mChanger, &IncidenceChanger::createFinished, this, &HistoryTest::createFinished);
connect(mChanger,
&IncidenceChanger::deleteFinished,
this, &HistoryTest::deleteFinished);
connect(mChanger, &IncidenceChanger::deleteFinished, this, &HistoryTest::deleteFinished);
connect(mChanger,
&IncidenceChanger::modifyFinished,
this, &HistoryTest::modifyFinished);
connect(mChanger, &IncidenceChanger::modifyFinished, this, &HistoryTest::modifyFinished);
connect(mHistory, &History::undone,
this, &HistoryTest::handleUndone);
connect(mHistory, &History::undone, this, &HistoryTest::handleUndone);
connect(mHistory, &History::redone,
this, &HistoryTest::handleRedone);
connect(mHistory, &History::redone, this, &HistoryTest::handleRedone);
}
void HistoryTest::testCreation_data()
......@@ -121,7 +112,7 @@ void HistoryTest::testCreation()
QCOMPARE(mHistory->d->redoCount(), 0);
QCOMPARE(mHistory->d->undoCount(), 1);
//undo it
// undo it
mPendingSignals[UndoSignal] = 1;
mHistory->undo();
waitForSignals();
......@@ -158,8 +149,7 @@ void HistoryTest::testDeletion_data()
QTest::newRow("two items") << items;
items.clear();
items << createItem(mCollection) << createItem(mCollection) << createItem(mCollection)
<< createItem(mCollection);
items << createItem(mCollection) << createItem(mCollection) << createItem(mCollection) << createItem(mCollection);
QTest::newRow("four items") << items;
}
......@@ -170,8 +160,7 @@ void HistoryTest::testDeletion()
QCOMPARE(mHistory->d->redoCount(), 0);
QCOMPARE(mHistory->d->undoCount(), 0);
const int changeId = (items.count() == 1) ? mChanger->deleteIncidence(items.first())
: mChanger->deleteIncidences(items);
const int changeId = (items.count() == 1) ? mChanger->deleteIncidence(items.first()) : mChanger->deleteIncidences(items);
QVERIFY(changeId > 0);
mKnownChangeIds << changeId;
waitForSignals();
......@@ -261,7 +250,7 @@ void HistoryTest::testModification()
void HistoryTest::testAtomicOperations_data()
{
QTest::addColumn<Akonadi::Item::List>("items");
QTest::addColumn<QList<Akonadi::IncidenceChanger::ChangeType> >("changeTypes");
QTest::addColumn<QList<Akonadi::IncidenceChanger::ChangeType>>("changeTypes");
Akonadi::Item::List items;
QList<Akonadi::IncidenceChanger::ChangeType> changeTypes;
......@@ -299,8 +288,7 @@ void HistoryTest::testAtomicOperations()
int changeId = -1;
switch (changeTypes[i]) {
case IncidenceChanger::ChangeTypeCreate:
changeId = mChanger->createIncidence(item.hasPayload() ? item.payload<KCalendarCore::Incidence::Ptr>()
: Incidence::Ptr());
changeId = mChanger->createIncidence(item.hasPayload() ? item.payload<KCalendarCore::Incidence::Ptr>() : Incidence::Ptr());
QVERIFY(changeId != -1);
mKnownChangeIds << changeId;
++mPendingSignals[CreationSignal];
......@@ -311,8 +299,7 @@ void HistoryTest::testAtomicOperations()
mKnownChangeIds << changeId;
++mPendingSignals[DeletionSignal];
break;
case IncidenceChanger::ChangeTypeModify:
{
case IncidenceChanger::ChangeTypeModify: {
QVERIFY(item.isValid());
QVERIFY(item.hasPayload<KCalendarCore::Incidence::Ptr>());
Incidence::Ptr originalPayload = Incidence::Ptr(item.payload<KCalendarCore::Incidence::Ptr>()->clone());
......@@ -379,7 +366,7 @@ void HistoryTest::testAtomicOperations()
void HistoryTest::testMix_data()
{
QTest::addColumn<Akonadi::Item::List>("items");
QTest::addColumn<QList<Akonadi::IncidenceChanger::ChangeType> >("changeTypes");
QTest::addColumn<QList<Akonadi::IncidenceChanger::ChangeType>>("changeTypes");
Akonadi::Item::List items;
QList<Akonadi::IncidenceChanger::ChangeType> changeTypes;
......@@ -438,8 +425,7 @@ void HistoryTest::testMix()
++mPendingSignals[DeletionSignal];
waitForSignals();
break;
case IncidenceChanger::ChangeTypeModify:
{
case IncidenceChanger::ChangeTypeModify: {
item = item.isValid() ? item : mItemByChangeId.value(lastCreateChangeId);
QVERIFY(item.isValid());
QVERIFY(item.hasPayload<KCalendarCore::Incidence::Ptr>());
......@@ -510,7 +496,10 @@ void HistoryTest::waitForSignals()
QVERIFY(!QTestEventLoop::instance().timeout());
}
void HistoryTest::deleteFinished(int changeId, const QVector<Akonadi::Item::Id> &deletedIds, Akonadi::IncidenceChanger::ResultCode resultCode, const QString &errorMessage)
void HistoryTest::deleteFinished(int changeId,
const QVector<Akonadi::Item::Id> &deletedIds,
Akonadi::IncidenceChanger::ResultCode resultCode,
const QString &errorMessage)
{
QVERIFY(changeId != -1);
......@@ -550,7 +539,7 @@ void HistoryTest::createFinished(int changeId, const Akonadi::Item &item, Akonad
mItemByChangeId.insert(changeId, item);
QVERIFY(item.hasPayload());
Incidence::Ptr incidence = item.payload<KCalendarCore::Incidence::Ptr>();
//mItemIdByUid.insert(incidence->uid(), item.id());
// mItemIdByUid.insert(incidence->uid(), item.id());
} else {
qDebug() << "Error string is " << errorString;
}
......
......@@ -7,19 +7,12 @@
#ifndef HISTORY_TEST_H
#define HISTORY_TEST_H
#include "unittestbase.h"
#include "../src/history.h"
#include "../src/history_p.h"
#include "../src/incidencechanger.h"
#include "unittestbase.h"
enum SignalType {
DeletionSignal,
CreationSignal,
ModificationSignal,
UndoSignal,
RedoSignal,
NumSignals
};
enum SignalType { DeletionSignal, CreationSignal, ModificationSignal, UndoSignal, RedoSignal, NumSignals };
class HistoryTest : public UnitTestBase
{
......@@ -53,7 +46,8 @@ private:
void waitForSignals();
public Q_SLOTS:
void deleteFinished(int changeId, const QVector<Akonadi::Item::Id> &deletedIds, Akonadi::IncidenceChanger::ResultCode resultCode, const QString &errorMessage);
void
deleteFinished(int changeId, const QVector<Akonadi::Item::Id> &deletedIds, Akonadi::IncidenceChanger::ResultCode resultCode, const QString &errorMessage);
void createFinished(int changeId, const Akonadi::Item &item, Akonadi::IncidenceChanger::ResultCode resultCode, const QString &errorString);
......
This diff is collapsed.
This diff is collapsed.
......@@ -56,7 +56,8 @@ public Q_SLOTS:
void onCreateFinished(int changeId, const Akonadi::Item &item, Akonadi::IncidenceChanger::ResultCode resultCode, const QString &errorString);
void onDeleteFinished(int changeId, const QVector<Akonadi::Item::Id> &deletedIds, Akonadi::IncidenceChanger::ResultCode resultCode, const QString &errorMessage);
void
onDeleteFinished(int changeId, const QVector<Akonadi::Item::Id> &deletedIds, Akonadi::IncidenceChanger::ResultCode resultCode, const QString &errorMessage);
void onModifyFinished(int changeId, const Akonadi::Item &item, Akonadi::IncidenceChanger::ResultCode resultCode, const QString &errorString);
......
......@@ -6,8 +6,8 @@
#include <AkonadiCore/Item>
#include <KCalendarCore/Event>
#include <QTest>
#include <QObject>
#include <QTest>
using namespace Akonadi;
using namespace KCalendarCore;
......@@ -32,32 +32,32 @@ private Q_SLOTS:
{
QFETCH(QString, mimeType);
QByteArray serialized
= "BEGIN:VCALENDAR\n"
"PRODID:-//K Desktop Environment//NONSGML libkcal 3.5//EN\n"
"VERSION:2.0\n"
"BEGIN:VEVENT\n"
"DTSTAMP:20070109T100625Z\n"
"ORGANIZER;CN=\"Volker Krause\":MAILTO:vkrause@kde.org\n"
"CREATED:20070109T100553Z\n"
"UID:libkcal-1135684253.945\n"
"SEQUENCE:1\n"
"LAST-MODIFIED:20070109T100625Z\n"
"SUMMARY:Test event\n"
"LOCATION:here\n"
"CLASS:PUBLIC\n"
"PRIORITY:5\n"
"CATEGORIES:KDE\n"
"DTSTART:20070109T183000Z\n"
"DTEND:20070109T225900Z\n"
"TRANSP:OPAQUE\n"
"BEGIN:VALARM\n"
"DESCRIPTION:\n"
"ACTION:DISPLAY\n"
"TRIGGER;VALUE=DURATION:-PT45M\n"
"END:VALARM\n"
"END:VEVENT\n"
"END:VCALENDAR\n";
QByteArray serialized =
"BEGIN:VCALENDAR\n"
"PRODID:-//K Desktop Environment//NONSGML libkcal 3.5//EN\n"
"VERSION:2.0\n"
"BEGIN:VEVENT\n"
"DTSTAMP:20070109T100625Z\n"
"ORGANIZER;CN=\"Volker Krause\":MAILTO:vkrause@kde.org\n"
"CREATED:20070109T100553Z\n"
"UID:libkcal-1135684253.945\n"
"SEQUENCE:1\n"
"LAST-MODIFIED:20070109T100625Z\n"
"SUMMARY:Test event\n"
"LOCATION:here\n"
"CLASS:PUBLIC\n"
"PRIORITY:5\n"
"CATEGORIES:KDE\n"
"DTSTART:20070109T183000Z\n"
"DTEND:20070109T225900Z\n"
"TRANSP:OPAQUE\n"
"BEGIN:VALARM\n"
"DESCRIPTION:\n"
"ACTION:DISPLAY\n"
"TRIGGER;VALUE=DURATION:-PT45M\n"
"END:VALARM\n"
"END:VEVENT\n"
"END:VCALENDAR\n";
// deserializing
Item item;
......@@ -81,7 +81,7 @@ private Q_SLOTS:
QFETCH(QString, mimeType);
// 0 defaults to latin1.
//QT5 QVERIFY( QTextCodec::codecForCStrings() == 0 );
// QT5 QVERIFY( QTextCodec::codecForCStrings() == 0 );
const QDate currentDate = QDate::currentDate();
......@@ -92,7 +92,7 @@ private Q_SLOTS:
event->setAllDay(true);
// ü
const char latin1_umlaut[] = { static_cast<char>(0xFC), '\0' };
const char latin1_umlaut[] = {static_cast<char>(0xFC), '\0'};
event->setSummary(QLatin1String(latin1_umlaut));
Item item;
......@@ -100,7 +100,7 @@ private Q_SLOTS:
item.setPayload(event);
// Serializer the item, the serialization should be in UTF-8:
const char utf_umlaut[] = { static_cast<char>(0xC3), static_cast<char>(0XBC), '\0' };
const char utf_umlaut[] = {static_cast<char>(0xC3), static_cast<char>(0XBC), '\0'};
const QByteArray bytes = item.payloadData();
QVERIFY(bytes.contains(utf_umlaut));
QVERIFY(!bytes.contains(latin1_umlaut));
......
......@@ -8,15 +8,15 @@
#include "mailclient_p.h"
#include <KCalendarCore/Incidence>
#include <KCalendarCore/FreeBusy>
#include <MailTransportAkonadi/MessageQueueJob>
#include <KCalendarCore/Incidence>
#include <KIdentityManagement/Identity>
#include <MailTransportAkonadi/MessageQueueJob>
#include <qtest_akonadi.h>
#include <QTestEventLoop>
#include <QObject>
#include <QTestEventLoop>
static const char *s_ourEmail = "unittests@dev.nul"; // change also in kdepimlibs/akonadi/calendar/tests/unittestenv/kdehome/share/config
......@@ -63,7 +63,8 @@ public:
{
}
MailTransport::MessageQueueJob *createMessageQueueJob(const KCalendarCore::IncidenceBase::Ptr &incidence, const KIdentityManagement::Identity &identity, QObject *parent = nullptr) override
MailTransport::MessageQueueJob *
createMessageQueueJob(const KCalendarCore::IncidenceBase::Ptr &incidence, const KIdentityManagement::Identity &identity, QObject *parent =