Mercurial > hg > easyhg
diff src/debug.cpp @ 708:067252b1e732
Support Qt5 older than 5.4
author | Chris Cannam |
---|---|
date | Wed, 12 Dec 2018 11:19:42 +0000 |
parents | af295de6a59b |
children |
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))) {