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["filesize"] = sourceFileInfo.size();
jsonObject["birthTime"] = sourceFileInfo jsonObject["birthTime"] = sourceFileInfo
#if QT_VERSION >= 0x051000 #if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
.birthTime() //deprecated since 5.10
#else
.created() .created()
#else
.birthTime()
#endif #endif
.toMSecsSinceEpoch(); .toMSecsSinceEpoch();
jsonObject["lastModified"] = sourceFileInfo.lastModified().toMSecsSinceEpoch(); jsonObject["lastModified"] = sourceFileInfo.lastModified().toMSecsSinceEpoch();