Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
KDE PIM Add-ons
Commits
10592578
Commit
10592578
authored
Aug 07, 2020
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve import windows contact file
parent
d10e382c
Pipeline
#29973
canceled with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
kaddressbook/importexportplugins/windows-contacts/importwindowcontact.cpp
...ortexportplugins/windows-contacts/importwindowcontact.cpp
+24
-0
No files found.
kaddressbook/importexportplugins/windows-contacts/importwindowcontact.cpp
View file @
10592578
...
...
@@ -232,6 +232,30 @@ KContacts::Addressee::List ImportWindowContact::importFile(const QString &fileNa
qCWarning
(
IMPORTEXPORTWINDOWSCONTACTPLUGIN_LOG
)
<<
" position tag unknown:"
<<
positionTag
;
}
}
}
else
if
(
tag
==
QLatin1String
(
"c:Gender"
))
{
//TODO verify it
KContacts
::
Gender
gender
;
gender
.
setGender
(
e
.
text
());
contact
.
setGender
(
gender
);
}
else
if
(
tag
==
QLatin1String
(
"c:Notes"
))
{
//TODO verify it
contact
.
setNote
(
e
.
text
());
}
else
if
(
tag
==
QLatin1String
(
"c:UrlCollection"
))
{
//TODO verify it
for
(
QDomElement
url
=
e
.
firstChildElement
();
!
url
.
isNull
();
url
=
url
.
nextSiblingElement
())
{
const
QString
urlTag
=
url
.
tagName
();
if
(
urlTag
==
QLatin1String
(
"c:Url"
))
{
for
(
QDomElement
urlInfo
=
url
.
firstChildElement
();
!
urlInfo
.
isNull
();
urlInfo
=
urlInfo
.
nextSiblingElement
())
{
const
QString
urlInfoTag
=
urlInfo
.
tagName
();
if
(
urlInfoTag
==
QLatin1String
(
"c:Value"
))
{
KContacts
::
ResourceLocatorUrl
url
;
url
.
setUrl
(
QUrl
::
fromUserInput
(
urlInfo
.
text
()));
contact
.
insertExtraUrl
(
url
);
}
else
{
qCWarning
(
IMPORTEXPORTWINDOWSCONTACTPLUGIN_LOG
)
<<
" url info tag not supported yet "
<<
urlInfoTag
;
}
}
}
else
{
qCWarning
(
IMPORTEXPORTWINDOWSCONTACTPLUGIN_LOG
)
<<
" url tag unknown:"
<<
urlTag
;
}
}
}
else
{
qCWarning
(
IMPORTEXPORTWINDOWSCONTACTPLUGIN_LOG
)
<<
"unknown tag "
<<
tag
;
}
...
...
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