summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2016-05-24 13:31:35 +0200
committerMontel Laurent <[email protected]>2016-05-24 13:31:35 +0200
commit00f529d0a4f3b25b6dc301e6eab7f18f493acb63 (patch)
tree2167ebd6771b2ce1fe5f751d3d618cf791705d9e
parentaa93d31777d138c395c0160946da27457c32992e (diff)
Minor optimization
-rw-r--r--messageviewer/src/viewer/urlhandlermanager.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/messageviewer/src/viewer/urlhandlermanager.cpp b/messageviewer/src/viewer/urlhandlermanager.cpp
index 0c278fe..86b6785 100644
--- a/messageviewer/src/viewer/urlhandlermanager.cpp
+++ b/messageviewer/src/viewer/urlhandlermanager.cpp
@@ -113,6 +113,8 @@ public:
} else if (urlPath == QStringLiteral("printpreview")) {
viewer->setMailAction(MessageViewer::Viewer::PrintPreview);
return true;
+ } else {
+ qCDebug(MESSAGEVIEWER_LOG) << "Unknown urlPath " << urlPath;
}
}
return false;
@@ -139,6 +141,8 @@ public:
return i18n("Print Message");
} else if (urlPath == QStringLiteral("printpreview")) {
return i18n("Print Preview Message");
+ } else {
+ qCDebug(MESSAGEVIEWER_LOG) << "Unknown urlPath " << urlPath;
}
}
return QString();
@@ -373,8 +377,8 @@ static KMime::Content *partNodeFromXKMailUrl(const QUrl &url, ViewerPrivate *w,
return 0;
}
//KMime::ContentIndex index( urlParts[1] );
- *path = QUrl::fromPercentEncoding(urlParts[2].toLatin1());
- return w->nodeFromUrl(urlParts[1]);
+ *path = QUrl::fromPercentEncoding(urlParts.at(2).toLatin1());
+ return w->nodeFromUrl(urlParts.at(1));
}
bool URLHandlerManager::BodyPartURLHandlerManager::handleClick(const QUrl &url, ViewerPrivate *w) const