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
792b4d44
Commit
792b4d44
authored
May 25, 2020
by
Laurent Montel
Browse files
Fix mail autotest
parent
3d4f22d9
Changes
6
Hide whitespace changes
Inline
Side-by-side
core/autotests/mail/exportmailjobinterfacetest.cpp
View file @
792b4d44
...
...
@@ -137,6 +137,12 @@ QString ExportMailJobInterfaceTestImpl::createResource(const QString &resources,
return
{};
}
QVector
<
uint
>
ExportMailJobInterfaceTestImpl
::
listIdentityUoid
()
const
{
//TODO
return
{};
}
ExportMailJobInterfaceTest
::
ExportMailJobInterfaceTest
(
QObject
*
parent
)
:
QObject
(
parent
)
{
...
...
@@ -183,3 +189,5 @@ void ExportMailJobInterfaceTest::exportMail()
file
->
start
();
delete
exportNote
;
}
core/autotests/mail/exportmailjobinterfacetest.h
View file @
792b4d44
...
...
@@ -50,6 +50,7 @@ protected:
void
backupMailResourceFile
(
const
QString
&
agentIdentifier
,
const
QString
&
defaultPath
)
override
;
Q_REQUIRED_RESULT
QString
adaptNewResourceUrl
(
bool
overwriteResources
,
const
KSharedConfig
::
Ptr
&
resourceConfig
,
const
QString
&
storePath
)
override
;
Q_REQUIRED_RESULT
QString
createResource
(
const
QString
&
resources
,
const
QString
&
name
,
const
QMap
<
QString
,
QVariant
>
&
settings
,
bool
synchronizeTree
)
override
;
Q_REQUIRED_RESULT
QVector
<
uint
>
listIdentityUoid
()
const
override
;
void
exportFilters
()
override
;
};
...
...
core/mail/exportmailjobinterface.cpp
View file @
792b4d44
...
...
@@ -470,9 +470,8 @@ void ExportMailJobInterface::backupConfig()
}
//Automatic Add Contacts
KIdentityManagement
::
IdentityManager
::
ConstIterator
end
=
mIdentityManager
->
end
();
for
(
KIdentityManagement
::
IdentityManager
::
ConstIterator
it
=
mIdentityManager
->
begin
();
it
!=
end
;
++
it
)
{
const
uint
identity
=
(
*
it
).
uoid
();
const
QVector
<
uint
>
listIdentities
=
listIdentityUoid
();
for
(
uint
identity
:
listIdentities
)
{
const
QString
groupId
=
QStringLiteral
(
"Automatic Add Contacts %1"
).
arg
(
identity
);
if
(
kmailConfig
->
hasGroup
(
groupId
))
{
KConfigGroup
identityGroup
=
kmailConfig
->
group
(
groupId
);
...
...
core/mail/exportmailjobinterface.h
View file @
792b4d44
...
...
@@ -58,6 +58,7 @@ protected:
virtual
Q_REQUIRED_RESULT
QString
resourcePath
(
const
QString
&
identifier
)
const
=
0
;
virtual
void
backupMailResourceFile
(
const
QString
&
agentIdentifier
,
const
QString
&
defaultPath
)
=
0
;
virtual
void
exportFilters
()
=
0
;
virtual
Q_REQUIRED_RESULT
QVector
<
uint
>
listIdentityUoid
()
const
=
0
;
private:
void
slotCheckBackupIdentity
();
void
slotCheckBackupMailTransport
();
...
...
core/mail/exportmailjobinterfaceimpl.cpp
View file @
792b4d44
...
...
@@ -159,3 +159,14 @@ void ExportMailJobInterfaceImpl::exportFilters()
}
}
}
QVector
<
uint
>
ExportMailJobInterfaceImpl
::
listIdentityUoid
()
const
{
QVector
<
uint
>
listUiod
;
KIdentityManagement
::
IdentityManager
::
ConstIterator
end
=
mIdentityManager
->
end
();
for
(
KIdentityManagement
::
IdentityManager
::
ConstIterator
it
=
mIdentityManager
->
begin
();
it
!=
end
;
++
it
)
{
const
uint
identityUoid
=
(
*
it
).
uoid
();
listUiod
<<
identityUoid
;
}
return
listUiod
;
}
core/mail/exportmailjobinterfaceimpl.h
View file @
792b4d44
...
...
@@ -49,6 +49,7 @@ protected:
Q_REQUIRED_RESULT
QString
adaptNewResourceUrl
(
bool
overwriteResources
,
const
KSharedConfig
::
Ptr
&
resourceConfig
,
const
QString
&
storePath
)
override
;
Q_REQUIRED_RESULT
QString
createResource
(
const
QString
&
resources
,
const
QString
&
name
,
const
QMap
<
QString
,
QVariant
>
&
settings
,
bool
synchronizeTree
)
override
;
void
exportFilters
()
override
;
Q_REQUIRED_RESULT
QVector
<
uint
>
listIdentityUoid
()
const
override
;
};
#endif // ExportMailJob_H
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