summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandro Knauß <[email protected]>2015-10-15 11:17:49 +0200
committerSandro Knauß <[email protected]>2015-10-23 13:49:43 +0200
commit7e7ad1cc8053f00ad15a10d0cd3cde2e2554fa31 (patch)
tree063c3aa67ed8d88538d0fd051aae81aca36bbbbb
parent0be24f965dd30e16af0c6e443d897fb615abb430 (diff)
Move link to attachment to AttachmentMarkBlock.
-rw-r--r--messageviewer/src/viewer/messagepart.cpp4
-rw-r--r--messageviewer/src/viewer/objecttreeparser.cpp5
2 files changed, 3 insertions, 6 deletions
diff --git a/messageviewer/src/viewer/messagepart.cpp b/messageviewer/src/viewer/messagepart.cpp
index 45d13f0..b0f382b 100644
--- a/messageviewer/src/viewer/messagepart.cpp
+++ b/messageviewer/src/viewer/messagepart.cpp
@@ -87,7 +87,9 @@ AttachmentMarkBlock::~AttachmentMarkBlock()
void AttachmentMarkBlock::internalEnter()
{
if (mWriter && !entered) {
- mWriter->queue(QStringLiteral("<div id=\"attachmentDiv%1\">\n").arg(mNode->index().toString()));
+ const QString index = mNode->index().toString();
+ mWriter->queue(QStringLiteral("<a name=\"att%1\"></a>").arg(index));
+ mWriter->queue(QStringLiteral("<div id=\"attachmentDiv%1\">\n").arg(index));
entered = true;
}
}
diff --git a/messageviewer/src/viewer/objecttreeparser.cpp b/messageviewer/src/viewer/objecttreeparser.cpp
index 9cb55fa..281720c 100644
--- a/messageviewer/src/viewer/objecttreeparser.cpp
+++ b/messageviewer/src/viewer/objecttreeparser.cpp
@@ -337,11 +337,6 @@ void ObjectTreeParser::parseObjectTreeInternal(KMime::Content *node)
ProcessResult processResult(mNodeHelper);
- KMime::ContentIndex contentIndex = node->index();
- if (htmlWriter() /*&& contentIndex.isValid()*/) {
- htmlWriter()->queue(QStringLiteral("<a name=\"att%1\"></a>").arg(contentIndex.toString()));
- }
-
QByteArray mediaType("text");
QByteArray subType("plain");
if (node->contentType(false) && !node->contentType()->mediaType().isEmpty() &&