Fixed bug with compatibility for QFileInfo created/birthTime

This commit is contained in:
0xFEEDC0DE64
2018-09-22 07:28:48 +02:00
parent 562c4f429a
commit e828d4caea

View File

@@ -296,10 +296,11 @@ bool spread(const QString &sourcePath, const QString &targetPath)
jsonObject["filesize"] = sourceFileInfo.size();
jsonObject["birthTime"] = sourceFileInfo
#if QT_VERSION >= 0x051000
.birthTime()
#else
#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
//deprecated since 5.10
.created()
#else
.birthTime()
#endif
.toMSecsSinceEpoch();
jsonObject["lastModified"] = sourceFileInfo.lastModified().toMSecsSinceEpoch();