summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <[email protected]>2018-01-03 08:09:13 +0100
committerLaurent Montel <[email protected]>2018-01-03 08:09:13 +0100
commita7bf8026c4bdcd930d3dc78f8743ddf19e3e9166 (patch)
treefd9f0c9397be9aa45ebbfd06d8a5087d62dace21
parentd9499e7ce676a64ef634b9596483cd42496b1f3b (diff)
Add debug + minor optimization
-rw-r--r--messageviewer/src/header/headerstyle_util.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/messageviewer/src/header/headerstyle_util.cpp b/messageviewer/src/header/headerstyle_util.cpp
index b8260a2..2332ec8 100644
--- a/messageviewer/src/header/headerstyle_util.cpp
+++ b/messageviewer/src/header/headerstyle_util.cpp
@@ -66,10 +66,12 @@ QString HeaderStyleUtil::strToHtml(const QString &str, KTextToHTML::Options flag
QString HeaderStyleUtil::dateString(KMime::Message *message, bool printing, HeaderStyleUtilDateFormat dateFormat) const
{
const QDateTime dateTime = message->date()->dateTime();
- const time_t unixTime = dateTime.toTime_t();
if (!dateTime.isValid()) {
+ qCDebug(MESSAGEVIEWER_LOG) << "Unable to parse date";
return i18nc("Unknown date", "Unknown");
}
+
+ const time_t unixTime = dateTime.toTime_t();
if (printing) {
return KMime::DateFormatter::formatDate(KMime::DateFormatter::Localized, unixTime);
} else {