diff options
author | Michael Schuster <michael@schuster.ms> | 2019-12-24 10:26:16 +0300 |
---|---|---|
committer | Michael Schuster <michael@schuster.ms> | 2019-12-24 11:16:52 +0300 |
commit | 163c80e203d5f0f0f24147c23bb90c5b21d8a8fb (patch) | |
tree | 4c4a2c4b5ecd8b1cbc6c1e99c9b053f29eb6cc97 | |
parent | 73462e97aaba6ed8e352a06a48aeda6f8eac99aa (diff) |
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 <michael@schuster.ms>
(cherry picked from commit e07859fb3cc8451a180a3677f9eabe3c320af9b8)
Signed-off-by: Michael Schuster <michael@schuster.ms>
-rw-r--r-- | src/gui/activitywidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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(); |