Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Schuster <michael@schuster.ms>2019-12-24 10:26:16 +0300
committerMichael Schuster <michael@schuster.ms>2019-12-24 11:16:52 +0300
commit163c80e203d5f0f0f24147c23bb90c5b21d8a8fb (patch)
tree4c4a2c4b5ecd8b1cbc6c1e99c9b053f29eb6cc97
parent73462e97aaba6ed8e352a06a48aeda6f8eac99aa (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.cpp2
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();