summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-10-24 11:46:30 (GMT)
committerMontel Laurent <montel@kde.org>2016-10-24 11:46:30 (GMT)
commit4419745bc0fa72f3fdc0d3e54dbbbbda85f7d976 (patch)
tree79bfb104e83abffce459c94a559273683b43689c
parent1723bdd827fb48caf61f6e95b3abe258bad8158b (diff)
Not necessary to store in private class
-rw-r--r--messageviewer/src/messagepartthemes/default/defaultrenderer.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/messageviewer/src/messagepartthemes/default/defaultrenderer.cpp b/messageviewer/src/messagepartthemes/default/defaultrenderer.cpp
index f7c9059..cbff9c1 100644
--- a/messageviewer/src/messagepartthemes/default/defaultrenderer.cpp
+++ b/messageviewer/src/messagepartthemes/default/defaultrenderer.cpp
@@ -688,14 +688,12 @@ public:
int currQuoteLevel = -2; // -2 == no previous lines
bool curHidden = false; // no hide any block
+
+ QString collapseIconPath;
+ QString mExpandIconPath;
if (source()->showExpandQuotesMark()) {
- // Cache Icons
- if (mCollapseIcon.isEmpty()) {
- mCollapseIcon = IconNameCache::instance()->iconPathFromLocal(QStringLiteral("quotecollapse.png"));
- }
- if (mExpandIcon.isEmpty()) {
- mExpandIcon = IconNameCache::instance()->iconPathFromLocal(QStringLiteral("quoteexpand.png"));
- }
+ collapseIconPath = IconNameCache::instance()->iconPathFromLocal(QStringLiteral("quotecollapse.png"));
+ mExpandIconPath = IconNameCache::instance()->iconPathFromLocal(QStringLiteral("quoteexpand.png"));
}
int previousQuoteDepth = -1;
@@ -772,7 +770,7 @@ public:
htmlStr += QStringLiteral("<a href=\"kmail:levelquote?%1 \">"
"<img src=\"%2\"/></a>")
.arg(-1)
- .arg(mExpandIcon);
+ .arg(mExpandIconPath);
htmlStr += QLatin1String("</div><br/>");
htmlStr += quoteEnd;
}
@@ -781,7 +779,7 @@ public:
htmlStr += QStringLiteral("<a href=\"kmail:levelquote?%1 \">"
"<img src=\"%2\"/></a>")
.arg(actQuoteLevel)
- .arg(mCollapseIcon);
+ .arg(collapseIconPath);
htmlStr += QLatin1String("</div>");
if (actQuoteLevel < 3) {
htmlStr += quoteFontTag[actQuoteLevel];
@@ -1395,8 +1393,6 @@ private:
HtmlWriter *mOldWriter;
CSSHelperBase *mCSSHelper;
- QString mCollapseIcon;
- QString mExpandIcon;
};
DefaultRenderer::DefaultRenderer(const MimeTreeParser::Interface::MessagePart::Ptr &msgPart, CSSHelperBase *cssHelper)