summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPalo Kisa <palo.kisa@gmail.com>2015-11-12 22:14:49 +0100
committerPalo Kisa <palo.kisa@gmail.com>2015-11-12 22:14:49 +0100
commita072b933032647cd2feca45adb4c11fa80410af6 (patch)
tree271a34199fdb1caa4c723f775865e7ed8c6e162c /src
parent4f4ff22bb992b6a3443bc2288436547db9e223e2 (diff)
downloadtwinkle-a072b933032647cd2feca45adb4c11fa80410af6.tar
twinkle-a072b933032647cd2feca45adb4c11fa80410af6.tar.gz
twinkle-a072b933032647cd2feca45adb4c11fa80410af6.tar.lz
twinkle-a072b933032647cd2feca45adb4c11fa80410af6.tar.xz
twinkle-a072b933032647cd2feca45adb4c11fa80410af6.zip
historyform: Fix sorting by time of event
When static date/time format was used for "time" column: - sorting by "time" column was broken - locale based format of date/time couldn't be enabled => use the QDateTime for "time" column and leave Qt handle the showed format (based on locale)
Diffstat (limited to 'src')
-rw-r--r--src/gui/historyform.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/historyform.cpp b/src/gui/historyform.cpp
index d188255..e8e88ae 100644
--- a/src/gui/historyform.cpp
+++ b/src/gui/historyform.cpp
@@ -27,6 +27,7 @@
#include "qicon.h"
#include "audits/memman.h"
#include "historyform.h"
+#include <QDateTime>
#define HISTCOL_TIMESTAMP 0
#define HISTCOL_DIRECTION 1
@@ -174,8 +175,7 @@ void HistoryForm::loadHistory()
{
case HISTCOL_TIMESTAMP:
{
- QString time = QString::fromStdString(time2str(cr->time_start, "%d %b %Y %H:%M:%S"));
- m_model->setData(index, time);
+ m_model->setData(index, QDateTime::fromTime_t(cr->time_start));
break;
}
case HISTCOL_DIRECTION: