Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
PIM Data Exporter
Commits
63bfa30a
Commit
63bfa30a
authored
May 22, 2020
by
Laurent Montel
Browse files
Implement import identities. Need to log it
parent
d07b2424
Pipeline
#20864
passed with stage
in 6 minutes and 8 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
core/autotests/mail/CMakeLists.txt
View file @
63bfa30a
...
...
@@ -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
)
core/autotests/mail/importmailjobinterfacetest.cpp
View file @
63bfa30a
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment