From 821c1f0ba0f5e9121f363a7790b4e8ae15498662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tinkl?= Date: Wed, 11 Jan 2023 11:27:46 +0100 Subject: [PATCH] hotfix(StatusMessage): restore timestamps Qt broke the API between Qt 5.14 and Qt 5.15 (https://doc.qt.io/archives/qt-5.14/qml-qtqml-qt.html#formatDateTime-method vs https://doc.qt.io/qt-5/qml-qtqml-qt.html#formatDateTime-method) We'll move this function to C++ in a followup PR to preserve the API compatibility while keeping it fast enough --- ui/StatusQ/src/StatusQ/Components/StatusMessage.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/StatusQ/src/StatusQ/Components/StatusMessage.qml b/ui/StatusQ/src/StatusQ/Components/StatusMessage.qml index 2495875502..0fa7ec4019 100644 --- a/ui/StatusQ/src/StatusQ/Components/StatusMessage.qml +++ b/ui/StatusQ/src/StatusQ/Components/StatusMessage.qml @@ -63,8 +63,8 @@ Control { property StatusMessageDetails messageDetails: StatusMessageDetails {} property StatusMessageDetails replyDetails: StatusMessageDetails {} - property string timestampString: Qt.formatTime(new Date(timestamp), Qt.locale(), Locale.ShortFormat) - property string timestampTooltipString: Qt.formatDateTime(new Date(timestamp), Qt.locale(), Locale.LongFormat) + property string timestampString: new Date(timestamp).toLocaleTimeString(Qt.locale(), Locale.ShortFormat) + property string timestampTooltipString: new Date(timestamp).toLocaleString() signal clicked(var sender, var mouse) signal profilePictureClicked(var sender, var mouse)