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
PIM MailCommon
Commits
0b234a97
Verified
Commit
0b234a97
authored
Oct 24, 2021
by
Marco Rebhan
Browse files
Replace removed insertEmail with addEmail
(see KContacts commit 779da83bcfa42ddc55a17a039e2d9ae9370266d0)
parent
ceb93395
Pipeline
#91054
passed with stage
in 29 minutes and 46 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/filter/filteractions/filteractionaddtoaddressbook.cpp
View file @
0b234a97
...
...
@@ -17,6 +17,7 @@
#include <KContacts/Addressee>
#include <KEmailAddress>
#include <KLocalizedString>
#include <kcontacts_version.h>
#include <QGridLayout>
#include <QLabel>
...
...
@@ -78,12 +79,18 @@ FilterAction::ReturnCode FilterActionAddToAddressBook::process(ItemContext &cont
for
(
const
QString
&
singleEmail
:
emails
)
{
QString
name
;
QString
email
;
KContacts
::
Addressee
::
parseEmailAddress
(
singleEmail
,
name
,
email
);
QString
email
String
;
KContacts
::
Addressee
::
parseEmailAddress
(
singleEmail
,
name
,
email
String
);
KContacts
::
Addressee
contact
;
contact
.
setNameFromString
(
name
);
contact
.
insertEmail
(
email
,
true
);
#if KContacts_VERSION < QT_VERSION_CHECK(5, 88, 0)
contact
.
insertEmail
(
emailString
,
true
);
#else
KContacts
::
Email
email
(
emailString
);
email
.
setPreferred
(
true
);
contact
.
addEmail
(
email
);
#endif
if
(
!
mCategory
.
isEmpty
())
{
contact
.
setCategories
(
mCategory
.
split
(
QLatin1Char
(
';'
)));
}
...
...
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