Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
Akonadi Data Import Wizard
Commits
3be1a091
Commit
3be1a091
authored
Apr 16, 2017
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comment debug
parent
05e383d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
23 deletions
+28
-23
src/autodetect/sylpheed/sylpheedaddressbook.cpp
src/autodetect/sylpheed/sylpheedaddressbook.cpp
+12
-12
src/autodetect/sylpheed/sylpheedsettings.cpp
src/autodetect/sylpheed/sylpheedsettings.cpp
+16
-11
No files found.
src/autodetect/sylpheed/sylpheedaddressbook.cpp
View file @
3be1a091
...
...
@@ -21,7 +21,7 @@
#include <KContacts/Addressee>
#include <kcontacts/contactgroup.h>
#include "importwizard_debug.h"
//
#include "importwizard_debug.h"
#include <KLocalizedString>
#include <QDir>
...
...
@@ -54,9 +54,9 @@ void SylpheedAddressBook::importAddressBook()
void
SylpheedAddressBook
::
readAddressBook
(
const
QString
&
filename
)
{
QFile
file
(
filename
);
//qCDebug(IMPORTWIZARD_LOG)<<" import filename :"<<filename;
//
//FIXME
qCDebug(IMPORTWIZARD_LOG)<<" import filename :"<<filename;
if
(
!
file
.
open
(
QIODevice
::
ReadOnly
))
{
qCDebug
(
IMPORTWIZARD_LOG
)
<<
" We can't open file"
<<
filename
;
//FIXME
qCDebug(IMPORTWIZARD_LOG) << " We can't open file" << filename;
return
;
}
QString
errorMsg
;
...
...
@@ -64,14 +64,14 @@ void SylpheedAddressBook::readAddressBook(const QString &filename)
int
errorCol
;
QDomDocument
doc
;
if
(
!
doc
.
setContent
(
&
file
,
&
errorMsg
,
&
errorRow
,
&
errorCol
))
{
qCDebug
(
IMPORTWIZARD_LOG
)
<<
"Unable to load document.Parse error in line "
<<
errorRow
<<
", col "
<<
errorCol
<<
": "
<<
errorMsg
;
//FIXME
qCDebug(IMPORTWIZARD_LOG) << "Unable to load document.Parse error in line " << errorRow
//
<< ", col " << errorCol << ": " << errorMsg;
return
;
}
QDomElement
domElement
=
doc
.
documentElement
();
if
(
domElement
.
isNull
())
{
qCDebug
(
IMPORTWIZARD_LOG
)
<<
"addressbook not found"
;
//FIXME
qCDebug(IMPORTWIZARD_LOG) << "addressbook not found";
return
;
}
...
...
@@ -121,7 +121,7 @@ void SylpheedAddressBook::readAddressBook(const QString &filename)
uidAddress
<<
addresslist
.
attribute
(
QStringLiteral
(
"uid"
));
}
}
else
{
qCDebug
(
IMPORTWIZARD_LOG
)
<<
" tagAddressList unknown :"
<<
tagAddressList
;
//FIXME
qCDebug(IMPORTWIZARD_LOG) << " tagAddressList unknown :" << tagAddressList;
}
}
if
(
!
emails
.
isEmpty
())
{
...
...
@@ -138,18 +138,18 @@ void SylpheedAddressBook::readAddressBook(const QString &filename)
contact
.
insertCustom
(
QStringLiteral
(
"KADDRESSBOOK"
),
name
,
value
);
}
}
else
{
qCDebug
(
IMPORTWIZARD_LOG
)
<<
"tagAttributeList not implemented "
<<
tagAttributeList
;
//FIXME
qCDebug(IMPORTWIZARD_LOG) << "tagAttributeList not implemented " << tagAttributeList;
}
}
}
else
{
qCDebug
(
IMPORTWIZARD_LOG
)
<<
" addressTag unknown :"
<<
addressTag
;
//FIXME
qCDebug(IMPORTWIZARD_LOG) << " addressTag unknown :" << addressTag;
}
}
if
(
!
mAddressBookUid
.
contains
(
uidPerson
))
{
mAddressBookUid
.
insert
(
uidPerson
,
uidAddress
);
}
else
{
qCDebug
(
IMPORTWIZARD_LOG
)
<<
" problem uidPerson already stored"
<<
uidPerson
;
//FIXME
qCDebug(IMPORTWIZARD_LOG) << " problem uidPerson already stored" << uidPerson;
}
addImportContactNote
(
contact
,
QStringLiteral
(
"Sylpheed"
));
createContact
(
contact
);
...
...
@@ -174,7 +174,7 @@ void SylpheedAddressBook::readAddressBook(const QString &filename)
if
(
!
pid
.
isEmpty
()
&&
!
eid
.
isEmpty
())
{
//TODO
}
else
{
qCDebug
(
IMPORTWIZARD_LOG
)
<<
" Problem with group"
<<
name
;
//FIXME
qCDebug(IMPORTWIZARD_LOG) << " Problem with group" << name;
}
//TODO
}
...
...
@@ -183,7 +183,7 @@ void SylpheedAddressBook::readAddressBook(const QString &filename)
}
createGroup
(
group
);
}
else
{
qCDebug
(
IMPORTWIZARD_LOG
)
<<
" SylpheedAddressBook::readAddressBook tag unknown :"
<<
tag
;
//FIXME
qCDebug(IMPORTWIZARD_LOG) << " SylpheedAddressBook::readAddressBook tag unknown :" << tag;
}
}
}
src/autodetect/sylpheed/sylpheedsettings.cpp
View file @
3be1a091
...
...
@@ -28,7 +28,7 @@
#include <KConfig>
#include <KConfigGroup>
#include "importwizard_debug.h"
//
#include "importwizard_debug.h"
#include <QStringList>
#include <QFile>
...
...
@@ -72,7 +72,7 @@ void SylpheedSettings::importSettings(const QString &filename, const QString &pa
QFile
customHeaderFile
(
customheaderrc
);
if
(
customHeaderFile
.
exists
())
{
if
(
!
customHeaderFile
.
open
(
QIODevice
::
ReadOnly
))
{
qCDebug
(
IMPORTWIZARD_LOG
)
<<
" We can't open file"
<<
customheaderrc
;
//FIXME
qCDebug(IMPORTWIZARD_LOG) << " We can't open file" << customheaderrc;
}
else
{
readCustomHeader
(
&
customHeaderFile
);
}
...
...
@@ -276,7 +276,8 @@ void SylpheedSettings::readSignature(const KConfigGroup &accountConfig, KIdentit
signature
.
setText
(
accountConfig
.
readEntry
(
"signature_text"
));
break
;
default:
qCDebug
(
IMPORTWIZARD_LOG
)
<<
" signature type unknown :"
<<
signatureType
;
//FIXME qCDebug(IMPORTWIZARD_LOG) << " signature type unknown :" << signatureType;
break
;
}
const
int
signatureEnabled
=
accountConfig
.
readEntry
(
"auto_signature"
,
-
1
);
switch
(
signatureEnabled
)
{
...
...
@@ -289,7 +290,8 @@ void SylpheedSettings::readSignature(const KConfigGroup &accountConfig, KIdentit
signature
.
setEnabledSignature
(
true
);
break
;
default:
qCDebug
(
IMPORTWIZARD_LOG
)
<<
" auto_signature undefined "
<<
signatureEnabled
;
//FIXME qCDebug(IMPORTWIZARD_LOG) << " auto_signature undefined " << signatureEnabled;
break
;
}
//TODO const bool signatureBeforeQuote = ( accountConfig.readEntry( "signature_before_quote", 0 ) == 1 ); not implemented in kmail
...
...
@@ -323,7 +325,7 @@ void SylpheedSettings::readPop3Account(const KConfigGroup &accountConfig, bool c
settings
.
insert
(
QStringLiteral
(
"UseTLS"
),
true
);
break
;
default:
qCDebug
(
IMPORTWIZARD_LOG
)
<<
" unknown ssl_pop value "
<<
sslPop
;
//FIXME
qCDebug(IMPORTWIZARD_LOG) << " unknown ssl_pop value " << sslPop;
break
;
}
}
...
...
@@ -381,7 +383,7 @@ void SylpheedSettings::readImapAccount(const KConfigGroup &accountConfig, bool c
settings
.
insert
(
QStringLiteral
(
"Safety"
),
QStringLiteral
(
"STARTTLS"
));
break
;
default:
qCDebug
(
IMPORTWIZARD_LOG
)
<<
" sslimap unknown "
<<
sslimap
;
//FIXME
qCDebug(IMPORTWIZARD_LOG) << " sslimap unknown " << sslimap;
break
;
}
...
...
@@ -409,7 +411,7 @@ void SylpheedSettings::readImapAccount(const KConfigGroup &accountConfig, bool c
settings
.
insert
(
QStringLiteral
(
"Authentication"
),
MailTransport
::
Transport
::
EnumAuthenticationType
::
PLAIN
);
break
;
default:
qCDebug
(
IMPORTWIZARD_LOG
)
<<
" imap auth unknown "
<<
auth
;
//FIXME
qCDebug(IMPORTWIZARD_LOG) << " imap auth unknown " << auth;
break
;
}
...
...
@@ -441,14 +443,15 @@ void SylpheedSettings::readAccount(const KConfigGroup &accountConfig, bool check
readImapAccount
(
accountConfig
,
checkMailOnStartup
,
intervalCheckMail
);
break
;
case
4
:
qCDebug
(
IMPORTWIZARD_LOG
)
<<
" Add it when nntp resource will implemented"
;
//FIXME
qCDebug(IMPORTWIZARD_LOG) << " Add it when nntp resource will implemented";
//news
break
;
case
5
:
//local
break
;
default:
qCDebug
(
IMPORTWIZARD_LOG
)
<<
" protocol not defined"
<<
protocol
;
//FIXME qCDebug(IMPORTWIZARD_LOG) << " protocol not defined" << protocol;
break
;
}
}
}
...
...
@@ -532,7 +535,8 @@ QString SylpheedSettings::readTransport(const KConfigGroup &accountConfig)
mt
->
setAuthenticationType
(
MailTransport
::
Transport
::
EnumAuthenticationType
::
PLAIN
);
break
;
default:
qCDebug
(
IMPORTWIZARD_LOG
)
<<
" smtp authentication unknown :"
<<
authMethod
;
//FIXME qCDebug(IMPORTWIZARD_LOG) << " smtp authentication unknown :" << authMethod;
break
;
}
}
const
int
sslSmtp
=
accountConfig
.
readEntry
(
QStringLiteral
(
"ssl_smtp"
),
0
);
...
...
@@ -547,7 +551,8 @@ QString SylpheedSettings::readTransport(const KConfigGroup &accountConfig)
mt
->
setEncryption
(
MailTransport
::
Transport
::
EnumEncryption
::
TLS
);
break
;
default:
qCDebug
(
IMPORTWIZARD_LOG
)
<<
" smtp ssl config unknown :"
<<
sslSmtp
;
//FIXME qCDebug(IMPORTWIZARD_LOG) << " smtp ssl config unknown :" << sslSmtp;
break
;
}
QString
domainName
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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