]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt/GuiChanges.cpp
Fix completion in math when inline completion was not yet shown
[lyx.git] / src / frontends / qt / GuiChanges.cpp
index 7be8e7ef0e77eb5704037493803a1c46a1241f4c..b2f809b026a5bd9c620f339dd060552d09e551d7 100644 (file)
@@ -70,8 +70,15 @@ void GuiChanges::updateContents()
                        text += inserted ? qt_("Inserted by %1").arg(author)
                                         : qt_("Deleted by %1").arg(author);
 
-               QString const date = QDateTime::fromTime_t(c.changetime)
-                                        .toString(Qt::DefaultLocaleLongDate);
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
+               QString const date =
+                       QLocale().toString(QDateTime::fromSecsSinceEpoch(c.changetime),
+                                       QLocale::LongFormat);
+#else
+               QString const date =
+                       QLocale().toString(QDateTime::fromTime_t(c.changetime),
+                                       QLocale::LongFormat);
+#endif
                if (!date.isEmpty()) {
                        if (!author.isEmpty())
                                text += qt_(" on[[date]] %1").arg(date);