From e828d4caea8d596b92c0f658b392868a929b12f4 Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 <0xFEEDC0DE64@gmail.com> Date: Sat, 22 Sep 2018 07:28:48 +0200 Subject: [PATCH] Fixed bug with compatibility for QFileInfo created/birthTime --- main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.cpp b/main.cpp index b90a473..67db2af 100644 --- a/main.cpp +++ b/main.cpp @@ -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();