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
d07b2424
Commit
d07b2424
authored
May 22, 2020
by
Laurent Montel
Browse files
Move to importmailjobinterfaceimpl directly
parent
00acc2d6
Changes
4
Hide whitespace changes
Inline
Side-by-side
core/mail/importmailjobinterface.cpp
View file @
d07b2424
...
...
@@ -198,18 +198,6 @@ void ImportMailJobInterface::restoreTransports()
QTimer
::
singleShot
(
0
,
this
,
&
ImportMailJobInterface
::
slotNextStep
);
}
void
ImportMailJobInterface
::
addMailTransport
(
MailTransport
::
Transport
*
mt
,
int
defaultTransport
,
int
transportId
)
{
mt
->
forceUniqueName
();
mt
->
save
();
MailTransport
::
TransportManager
::
self
()
->
addTransport
(
mt
);
if
(
transportId
==
defaultTransport
)
{
MailTransport
::
TransportManager
::
self
()
->
setDefaultTransport
(
mt
->
id
());
}
mHashTransport
.
insert
(
transportId
,
mt
->
id
());
qDebug
()
<<
" void ImportMailJobInterface::addMailTransport(MailTransport::Transport *mt, int defaultTransport, int transportId)"
<<
transportId
;
}
void
ImportMailJobInterface
::
restoreResources
()
{
increaseProgressDialog
();
...
...
core/mail/importmailjobinterface.h
View file @
d07b2424
...
...
@@ -61,9 +61,9 @@ protected:
virtual
void
addNewIdentity
(
const
QString
&
name
,
KConfigGroup
&
group
,
int
defaultIdentities
,
int
oldUid
)
=
0
;
virtual
void
importCustomMailTransport
(
const
QString
&
identifierValue
,
const
KConfigGroup
&
group
,
int
defaultTransport
,
int
transportId
)
=
0
;
virtual
void
importSmtpMailTransport
(
const
KConfigGroup
&
group
,
int
defaultTransport
,
int
transportId
)
=
0
;
void
addMailTransport
(
MailTransport
::
Transport
*
mt
,
int
defaultTransport
,
int
transportId
);
QHash
<
int
,
uint
>
mHashIdentity
;
QHash
<
int
,
int
>
mHashTransport
;
private:
void
restoreTransports
();
...
...
@@ -87,7 +87,6 @@ private:
void
mergeSieveTemplate
(
const
KArchiveFile
*
archivefile
,
const
QString
&
filename
,
const
QString
&
prefix
);
void
importSimpleFilesInDirectory
(
const
QString
&
relativePath
);
QHash
<
int
,
int
>
mHashTransport
;
QHash
<
QString
,
QString
>
mHashResources
;
QStringList
mFileList
;
};
...
...
core/mail/importmailjobinterfaceimpl.cpp
View file @
d07b2424
...
...
@@ -199,3 +199,15 @@ void ImportMailJobInterfaceImpl::importSmtpMailTransport(const KConfigGroup &gro
}
addMailTransport
(
mt
,
defaultTransport
,
transportId
);
}
void
ImportMailJobInterfaceImpl
::
addMailTransport
(
MailTransport
::
Transport
*
mt
,
int
defaultTransport
,
int
transportId
)
{
mt
->
forceUniqueName
();
mt
->
save
();
MailTransport
::
TransportManager
::
self
()
->
addTransport
(
mt
);
if
(
transportId
==
defaultTransport
)
{
MailTransport
::
TransportManager
::
self
()
->
setDefaultTransport
(
mt
->
id
());
}
mHashTransport
.
insert
(
transportId
,
mt
->
id
());
qDebug
()
<<
" void ImportMailJobInterface::addMailTransport(MailTransport::Transport *mt, int defaultTransport, int transportId)"
<<
transportId
;
}
core/mail/importmailjobinterfaceimpl.h
View file @
d07b2424
...
...
@@ -50,6 +50,7 @@ protected:
void
addNewIdentity
(
const
QString
&
name
,
KConfigGroup
&
group
,
int
defaultIdentities
,
int
oldUid
)
override
;
void
importCustomMailTransport
(
const
QString
&
identifierValue
,
const
KConfigGroup
&
group
,
int
defaultTransport
,
int
transportId
)
override
;
void
importSmtpMailTransport
(
const
KConfigGroup
&
group
,
int
defaultTransport
,
int
transportId
)
override
;
void
addMailTransport
(
MailTransport
::
Transport
*
mt
,
int
defaultTransport
,
int
transportId
);
private:
Q_REQUIRED_RESULT
QString
uniqueIdentityName
(
const
QString
&
name
);
};
...
...
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