changeset 708:067252b1e732

Support Qt5 older than 5.4
author Chris Cannam
date Wed, 12 Dec 2018 11:19:42 +0000
parents 3c2bdbd35ba7
children a13d89b87c2c
files src/debug.cpp
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/debug.cpp	Wed Dec 12 11:12:40 2018 +0000
+++ b/src/debug.cpp	Wed Dec 12 11:19:42 2018 +0000
@@ -41,8 +41,13 @@
         prefix = new char[20];
         sprintf(prefix, "[%lu]", (unsigned long)QCoreApplication::applicationPid());
         QString logFileName = QDir::homePath() + "/.easyhg.log"; // the fallback
+#if QT_VERSION >= 0x050400
         QString logDir = QStandardPaths::writableLocation
             (QStandardPaths::AppDataLocation);
+#else
+        QString logDir = QStandardPaths::writableLocation
+            (QStandardPaths::DataLocation);
+#endif
         if (logDir != "" &&
             (QDir(logDir).exists() ||
              QDir().mkpath(logDir))) {