Add QT version check at journal.cpp:262

This commit is contained in:
Phil Olynyk 2020-05-26 11:48:34 -04:00
parent e7309ea708
commit e921e7dee5

View File

@ -259,7 +259,11 @@ void BackupJournal(QString filename)
if (journal->settingExists(LastUpdated)) { if (journal->settingExists(LastUpdated)) {
QDateTime dt = sess->settings[LastUpdated].toDateTime(); QDateTime dt = sess->settings[LastUpdated].toDateTime();
#if QT_VERSION < QT_VERSION_CHECK(5,8,0)
qint64 dtx = dt.toMSecsSinceEpoch()/1000L;
#elif
qint64 dtx = dt.toSecsSinceEpoch(); qint64 dtx = dt.toSecsSinceEpoch();
#endif
QString dts = QString::number(dtx); QString dts = QString::number(dtx);
stream.writeAttribute("lastupdated", dts); stream.writeAttribute("lastupdated", dts);
} }