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
KAddressBook
Commits
ed1f891a
Verified
Commit
ed1f891a
authored
Oct 24, 2021
by
Marco Rebhan
Browse files
Replace removed insertEmail with addEmail
(see KContacts commit 779da83bcfa42ddc55a17a039e2d9ae9370266d0)
parent
4b6c39ee
Pipeline
#91044
passed with stage
in 4 minutes and 48 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/importexport/contactfields.cpp
View file @
ed1f891a
...
...
@@ -10,6 +10,8 @@
#include
<KLocalizedString>
#include
<QUrl>
#include
<kcontacts_version.h>
using
namespace
KAddressBookImportExport
;
QString
ContactFields
::
label
(
Field
field
)
...
...
@@ -163,17 +165,24 @@ void ContactFields::setValue(Field field, const QString &value, KContacts::Addre
case
ContactFields
::
Anniversary
:
contact
.
insertCustom
(
QStringLiteral
(
"KADDRESSBOOK"
),
QStringLiteral
(
"X-Anniversary"
),
value
);
break
;
case
ContactFields
::
PreferredEmail
:
case
ContactFields
::
PreferredEmail
:
{
#if KContacts_VERSION < QT_VERSION_CHECK(5, 88, 0)
contact
.
insertEmail
(
value
,
true
);
#else
KContacts
::
Email
email
(
value
);
email
.
setPreferred
(
true
);
contact
.
addEmail
(
email
);
#endif
break
;
}
case
ContactFields
::
Email2
:
contact
.
insertEmail
(
value
,
false
);
break
;
case
ContactFields
::
Email3
:
contact
.
insertEmail
(
value
,
false
);
break
;
case
ContactFields
::
Email4
:
#if KContacts_VERSION < QT_VERSION_CHECK(5, 88, 0)
contact
.
insertEmail
(
value
,
false
);
#else
contact
.
addEmail
(
KContacts
::
Email
(
value
));
#endif
break
;
case
ContactFields
::
Role
:
contact
.
setRole
(
value
);
...
...
Write
Preview
Supports
Markdown
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