From 163c80e203d5f0f0f24147c23bb90c5b21d8a8fb Mon Sep 17 00:00:00 2001 From: Michael Schuster Date: Tue, 24 Dec 2019 08:26:16 +0100 Subject: Fix date in ActivityWidget and remove unnecessary string conversion The local date and time value was converted into a string, just to be converted into another string, to be converted to a value once again, returning zero as the result. This caused the widget to always display "now". Looks like this was a simply copy and paste mistake from this line in ActivityListModel::slotActivitiesReceived: a._dateTime = QDateTime::fromString(json.value("date").toString(), Qt::ISODate); Signed-off-by: Michael Schuster (cherry picked from commit e07859fb3cc8451a180a3677f9eabe3c320af9b8) Signed-off-by: Michael Schuster --- src/gui/activitywidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/activitywidget.cpp b/src/gui/activitywidget.cpp index f5dbe7d49..469b0d14e 100644 --- a/src/gui/activitywidget.cpp +++ b/src/gui/activitywidget.cpp @@ -179,7 +179,7 @@ void ActivityWidget::slotItemCompleted(const QString &folder, const SyncFileItem Activity activity; activity._type = Activity::SyncFileItemType; //client activity activity._status = item->_status; - activity._dateTime = QDateTime::fromString(QDateTime::currentDateTime().toString(), Qt::ISODate); + activity._dateTime = QDateTime::currentDateTime(); activity._message = item->_originalFile; activity._link = folderInstance->accountState()->account()->url(); activity._accName = folderInstance->accountState()->account()->displayName(); -- cgit v1.2.3