summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-10-14 21:45:21 (GMT)
committerMontel Laurent <montel@kde.org>2016-10-14 21:45:21 (GMT)
commit1b73d7ee7297df4ca8ba42f33a28392e3d3e94b5 (patch)
tree346990013d44d3a70ddf389aaf092bbaeed61b8e
parente2550ca1e3a0aea852f18849984713d98335c4cd (diff)
Now we activate emoticon by default
-rw-r--r--plugins/messageviewerheaderplugins/briefheaderstyleplugin/briefheaderstyle.cpp5
-rw-r--r--plugins/messageviewerheaderplugins/enterpriseheaderstyleplugin/enterpriseheaderstyle.cpp5
-rw-r--r--plugins/messageviewerheaderplugins/fancyheaderstyleplugin/fancyheaderstyle.cpp37
3 files changed, 23 insertions, 24 deletions
diff --git a/plugins/messageviewerheaderplugins/briefheaderstyleplugin/briefheaderstyle.cpp b/plugins/messageviewerheaderplugins/briefheaderstyleplugin/briefheaderstyle.cpp
index 8f76241..34e579d 100644
--- a/plugins/messageviewerheaderplugins/briefheaderstyleplugin/briefheaderstyle.cpp
+++ b/plugins/messageviewerheaderplugins/briefheaderstyleplugin/briefheaderstyle.cpp
@@ -78,10 +78,7 @@ QString BriefHeaderStyle::format(KMime::Message *message) const
QString headerStr = QLatin1String("<div class=\"header\" dir=\"") + dir + QLatin1String("\">\n");
if (strategy->showHeader(QStringLiteral("subject"))) {
- KTextToHTML::Options flags = KTextToHTML::PreserveSpaces;
- if (MessageViewer::MessageViewerSettings::self()->showEmoticons()) {
- flags |= KTextToHTML::ReplaceSmileys;
- }
+ const KTextToHTML::Options flags = KTextToHTML::PreserveSpaces | KTextToHTML::ReplaceSmileys;
headerStr += QLatin1String("<div dir=\"") + subjectDir + QLatin1String("\">\n") +
QLatin1String("<b style=\"font-size:130%\">");
diff --git a/plugins/messageviewerheaderplugins/enterpriseheaderstyleplugin/enterpriseheaderstyle.cpp b/plugins/messageviewerheaderplugins/enterpriseheaderstyleplugin/enterpriseheaderstyle.cpp
index 7397ff7..3424346 100644
--- a/plugins/messageviewerheaderplugins/enterpriseheaderstyleplugin/enterpriseheaderstyle.cpp
+++ b/plugins/messageviewerheaderplugins/enterpriseheaderstyleplugin/enterpriseheaderstyle.cpp
@@ -100,10 +100,7 @@ QString EnterpriseHeaderStyle::format(KMime::Message *message) const
// subject
if (strategy->showHeader(QStringLiteral("subject"))) {
- KTextToHTML::Options flags = KTextToHTML::PreserveSpaces;
- if (MessageViewer::MessageViewerSettings::self()->showEmoticons()) {
- flags |= KTextToHTML::ReplaceSmileys;
- }
+ const KTextToHTML::Options flags = KTextToHTML::PreserveSpaces | KTextToHTML::ReplaceSmileys;
headerStr +=
QLatin1String(" <tr> \n"
diff --git a/plugins/messageviewerheaderplugins/fancyheaderstyleplugin/fancyheaderstyle.cpp b/plugins/messageviewerheaderplugins/fancyheaderstyleplugin/fancyheaderstyle.cpp
index dfc1883..a840315 100644
--- a/plugins/messageviewerheaderplugins/fancyheaderstyleplugin/fancyheaderstyle.cpp
+++ b/plugins/messageviewerheaderplugins/fancyheaderstyleplugin/fancyheaderstyle.cpp
@@ -102,10 +102,7 @@ QString FancyHeaderStyle::format(KMime::Message *message) const
// the subject line and box below for details
if (strategy->showHeader(QStringLiteral("subject"))) {
- KTextToHTML::Options flags = KTextToHTML::PreserveSpaces;
- if (MessageViewer::MessageViewerSettings::self()->showEmoticons()) {
- flags |= KTextToHTML::ReplaceSmileys;
- }
+ const KTextToHTML::Options flags = KTextToHTML::PreserveSpaces | KTextToHTML::ReplaceSmileys;
headerStr += QStringLiteral("<div dir=\"%1\">%2</div>\n")
.arg(subjectDir)
@@ -160,20 +157,28 @@ QString FancyHeaderStyle::format(KMime::Message *message) const
}
// cc line, if an
- if (strategy->showHeader(QStringLiteral("cc")) && message->cc(false))
- headerStr.append(QStringLiteral("<tr><th>%1</th>\n"
- "<td>%2</td></tr>\n")
- .arg(i18n("CC: "))
- .arg(StringUtil::emailAddrAsAnchor(message->cc(), StringUtil::DisplayFullAddress,
- QString(), StringUtil::ShowLink, StringUtil::ExpandableAddresses,
- QStringLiteral("FullCcAddressList"))));
+ if (strategy->showHeader(QStringLiteral("cc")) && message->cc(false)) {
+ const QString str = StringUtil::emailAddrAsAnchor(message->cc(), StringUtil::DisplayFullAddress,
+ QString(), StringUtil::ShowLink, StringUtil::ExpandableAddresses,
+ QStringLiteral("FullCcAddressList"));
+ if (!str.isEmpty()) {
+ headerStr.append(QStringLiteral("<tr><th>%1</th>\n"
+ "<td>%2</td></tr>\n")
+ .arg(i18n("CC: "))
+ .arg(str));
+ }
+ }
// Bcc line, if any
- if (strategy->showHeader(QStringLiteral("bcc")) && message->bcc(false))
- headerStr.append(QStringLiteral("<tr><th>%1</th>\n"
- "<td>%2</td></tr>\n")
- .arg(i18n("BCC: "))
- .arg(StringUtil::emailAddrAsAnchor(message->bcc(), StringUtil::DisplayFullAddress)));
+ if (strategy->showHeader(QStringLiteral("bcc")) && message->bcc(false)) {
+ const QString str = StringUtil::emailAddrAsAnchor(message->bcc(), StringUtil::DisplayFullAddress);
+ if (!str.isEmpty()) {
+ headerStr.append(QStringLiteral("<tr><th>%1</th>\n"
+ "<td>%2</td></tr>\n")
+ .arg(i18n("BCC: "))
+ .arg(str));
+ }
+ }
if (strategy->showHeader(QStringLiteral("date")))
headerStr.append(QStringLiteral("<tr><th>%1</th>\n"