# HG changeset patch # User Chris Cannam # Date 1544613582 0 # Node ID 067252b1e73246d5fd93db2be3e407a14d4c50eb # Parent 3c2bdbd35ba7a0c0c4aae918ed3c5c3ab4c5548e Support Qt5 older than 5.4 diff -r 3c2bdbd35ba7 -r 067252b1e732 src/debug.cpp --- 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))) {