summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-28 19:32:41 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-28 19:32:41 (GMT)
commit9579bfa4d19552ed9904b209bd954c929bb26372 (patch)
tree3d091ed36c0c2c97820c675e79414e4207d370e1
parent7d5aac0f81b2ba1e5d23d037487364cef24fb840 (diff)
Minor optimization
-rw-r--r--messageviewer/src/viewer/viewer_p.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/messageviewer/src/viewer/viewer_p.cpp b/messageviewer/src/viewer/viewer_p.cpp
index a28b203..f4a4c9d 100644
--- a/messageviewer/src/viewer/viewer_p.cpp
+++ b/messageviewer/src/viewer/viewer_p.cpp
@@ -2331,7 +2331,8 @@ QString ViewerPrivate::attachmentInjectionHtml()
QString link;
QString textAlign = QStringLiteral("right");
- if (headerStylePlugin()->name() == QStringLiteral("fancy")) {
+ const bool isFancyTheme = (headerStylePlugin()->name() == QStringLiteral("fancy"));
+ if (isFancyTheme) {
textAlign = QStringLiteral("left");
}
@@ -2347,7 +2348,7 @@ QString ViewerPrivate::attachmentInjectionHtml()
html.prepend(link);
- if (headerStylePlugin()->name() == QStringLiteral("fancy")) {
+ if (isFancyTheme) {
html.prepend(QStringLiteral("<div style=\"float:left;\">%1&nbsp;</div>").arg(i18n("Attachments:")));
}
return html;