mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Address Qt 6.7 deprecation warning
See https://doc.qt.io/qt-6.7/qdatetime-obsolete.html#setTimeSpec
This commit is contained in:
parent
d5ade099cf
commit
4d51a05ce4
@ -19,6 +19,9 @@
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QLocale>
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 7, 0))
|
||||
#include <QTimeZone>
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
@ -69,7 +72,11 @@ time_t from_asctime_utc(string t)
|
||||
<< "´ (invalid format)");
|
||||
return static_cast<time_t>(-1);
|
||||
}
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 7, 0))
|
||||
loc_dt.setTimeZone(QTimeZone(QTimeZone::UTC));
|
||||
#else
|
||||
loc_dt.setTimeSpec(Qt::UTC);
|
||||
#endif
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
|
||||
return loc_dt.toSecsSinceEpoch();
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user