Mercurial > hg > easyhg
diff src/debug.h @ 689:af295de6a59b
Ensure debug log is always created, in %AppData%
author | Chris Cannam |
---|---|
date | Mon, 10 Dec 2018 10:28:15 +0000 |
parents | ae67ea0af696 |
children |
line wrap: on
line diff
--- a/src/debug.h Sun Dec 09 16:46:44 2018 +0000 +++ b/src/debug.h Mon Dec 10 10:28:15 2018 +0000 @@ -15,8 +15,8 @@ COPYING included with this distribution for more information. */ -#ifndef _DEBUG_H_ -#define _DEBUG_H_ +#ifndef EASYHG_DEBUG_H +#define EASYHG_DEBUG_H #include <QDebug> #include <QTextStream> @@ -30,8 +30,6 @@ std::ostream &operator<<(std::ostream &, const QString &); std::ostream &operator<<(std::ostream &, const QUrl &); -#ifndef NDEBUG - extern QDebug &getEasyHgDebug(); #define DEBUG getEasyHgDebug() @@ -45,23 +43,5 @@ return d; } -#else - -class NoDebug -{ -public: - inline NoDebug() {} - inline ~NoDebug(){} - - template <typename T> - inline NoDebug &operator<<(const T &) { return *this; } - - inline NoDebug &operator<<(QTextStreamFunction) { return *this; } -}; - -#define DEBUG NoDebug() - -#endif /* !NDEBUG */ - #endif /* !_DEBUG_H_ */