Commit 63bfa30a authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Implement import identities. Need to log it

parent d07b2424
Pipeline #20864 passed with stage
in 6 minutes and 8 seconds
......@@ -14,4 +14,4 @@ set( importmailjobinterfacetest_SRCS importmailjobinterfacetest.cpp)
add_executable( importmailjobinterfacetest ${importmailjobinterfacetest_SRCS})
add_test(NAME importmailjobinterfacetest COMMAND importmailjobinterfacetest)
ecm_mark_as_test(importmailjobinterfacetest)
target_link_libraries(importmailjobinterfacetest Qt5::Test pimdataexporterprivate KF5::ConfigCore KF5::AkonadiMime test_resourceconverter)
target_link_libraries(importmailjobinterfacetest Qt5::Test pimdataexporterprivate KF5::ConfigCore KF5::AkonadiMime test_resourceconverter KF5::IdentityManagement)
......@@ -22,6 +22,8 @@
#include "resourceconvertertest.h"
#include "testimportfile.h"
#include "utils.h"
#include <KConfigGroup>
#include <KIdentityManagement/Identity>
#include <QSignalSpy>
#include <QTest>
QTEST_MAIN(ImportMailJobInterfaceTest)
......@@ -81,6 +83,22 @@ QString ImportMailJobInterfaceTestImpl::adaptNewResourceUrl(bool overwriteResour
void ImportMailJobInterfaceTestImpl::addNewIdentity(const QString &name, KConfigGroup &group, int defaultIdentities, int oldUid)
{
qDebug() << " void ImportMailJobInterfaceTestImpl::addNewIdentity(const QString &name, KConfigGroup &group, int defaultIdentities, int oldUid) not implemented yet";
KIdentityManagement::Identity identity;
group.writeEntry(QStringLiteral("Name"), name);
group.sync();
identity.readConfig(group);
if (oldUid != -1) {
mHashIdentity.insert(oldUid, identity.uoid());
if (oldUid == defaultIdentities) {
//TODO
//mIdentityManager->setAsDefault(identity->uoid());
}
}
//TODO log it.
//mIdentityManager->commit();
}
void ImportMailJobInterfaceTestImpl::importCustomMailTransport(const QString &identifierValue, const KConfigGroup &group, int defaultTransport, int transportId)
......
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