Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KDE PIM Add-ons
Commits
cf775755
Commit
cf775755
authored
Aug 31, 2020
by
Laurent Montel
😁
Browse files
Fix import gender
parent
df09817d
Pipeline
#32438
failed with stage
in 94 minutes and 38 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
kaddressbook/importexportplugins/windows-contacts/importwindowcontact.cpp
View file @
cf775755
...
...
@@ -93,6 +93,7 @@ KContacts::Addressee::List ImportWindowContact::importFile(const QString &fileNa
}
else
if
(
nameInfoTag
==
QLatin1String
(
"c:Suffix"
))
{
contact
.
setSuffix
(
nameInfo
.
text
());
}
else
{
//TODO middlename/generation
qCWarning
(
IMPORTEXPORTWINDOWSCONTACTPLUGIN_LOG
)
<<
" name tag not supported yet "
<<
nameInfoTag
;
}
}
...
...
@@ -221,7 +222,15 @@ KContacts::Addressee::List ImportWindowContact::importFile(const QString &fileNa
}
}
else
if
(
tag
==
QLatin1String
(
"c:Gender"
))
{
//TODO verify it
KContacts
::
Gender
gender
;
gender
.
setGender
(
e
.
text
());
const
QString
genderStr
=
e
.
text
();
if
(
genderStr
==
QLatin1String
(
"Male"
))
{
gender
.
setGender
(
QStringLiteral
(
"H"
));
}
else
if
(
genderStr
==
QLatin1String
(
"Female"
))
{
gender
.
setGender
(
QStringLiteral
(
"F"
));
}
else
{
//Don't provide gender
continue
;
}
contact
.
setGender
(
gender
);
}
else
if
(
tag
==
QLatin1String
(
"c:Notes"
))
{
//TODO verify it
contact
.
setNote
(
e
.
text
());
...
...
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