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
Mail-related libraries
Commits
0c2e8730
Commit
0c2e8730
authored
Mar 22, 2016
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add preferred
parent
781ee8c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
kaddressbookgrantlee/src/printing/contactgrantleeprintemail.cpp
...ssbookgrantlee/src/printing/contactgrantleeprintemail.cpp
+7
-0
kaddressbookgrantlee/src/printing/contactgrantleeprintemail.h
...ressbookgrantlee/src/printing/contactgrantleeprintemail.h
+2
-0
No files found.
kaddressbookgrantlee/src/printing/contactgrantleeprintemail.cpp
View file @
0c2e8730
...
...
@@ -37,6 +37,13 @@ QString ContactGrantleePrintEmail::email() const
return
mAddressee
.
fullEmail
(
email
);
}
bool
ContactGrantleePrintEmail
::
preferred
()
const
{
const
QStringList
value
=
mEmail
.
parameters
().
value
(
QStringLiteral
(
"type"
));
//Validate PREF and pref
return
value
.
contains
(
QStringLiteral
(
"pref"
),
Qt
::
CaseInsensitive
);
}
QString
ContactGrantleePrintEmail
::
emailFormatted
()
const
{
const
QString
email
=
mEmail
.
mail
();
...
...
kaddressbookgrantlee/src/printing/contactgrantleeprintemail.h
View file @
0c2e8730
...
...
@@ -30,12 +30,14 @@ class ContactGrantleePrintEmail : public QObject
Q_OBJECT
Q_PROPERTY
(
QString
emailFormatted
READ
emailFormatted
)
Q_PROPERTY
(
QString
email
READ
email
)
Q_PROPERTY
(
bool
preferred
READ
preferred
)
public:
explicit
ContactGrantleePrintEmail
(
const
KContacts
::
Addressee
&
addressee
,
const
KContacts
::
Email
&
email
,
QObject
*
parent
=
Q_NULLPTR
);
~
ContactGrantleePrintEmail
();
QString
emailFormatted
()
const
;
QString
email
()
const
;
bool
preferred
()
const
;
private:
KContacts
::
Email
mEmail
;
KContacts
::
Addressee
mAddressee
;
...
...
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