mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-06 11:23:45 +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 <QDateTime>
|
||||||
#include <QLocale>
|
#include <QLocale>
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(6, 7, 0))
|
||||||
|
#include <QTimeZone>
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
@ -69,7 +72,11 @@ time_t from_asctime_utc(string t)
|
|||||||
<< "´ (invalid format)");
|
<< "´ (invalid format)");
|
||||||
return static_cast<time_t>(-1);
|
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);
|
loc_dt.setTimeSpec(Qt::UTC);
|
||||||
|
#endif
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
|
||||||
return loc_dt.toSecsSinceEpoch();
|
return loc_dt.toSecsSinceEpoch();
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user