Mercurial > hg > svcore
comparison base/Debug.h @ 690:1424aa29ae95
Seems to be a bad idea to use plain DEBUG symbol on OS/X (system wants it)
author | Chris Cannam |
---|---|
date | Tue, 14 Jun 2011 15:26:52 +0100 |
parents | 99222d4bfc78 |
children | e802e550a1f2 |
comparison
equal
deleted
inserted
replaced
689:573d45e9487b | 690:1424aa29ae95 |
---|---|
30 | 30 |
31 #ifndef NDEBUG | 31 #ifndef NDEBUG |
32 | 32 |
33 extern QDebug &getSVDebug(); | 33 extern QDebug &getSVDebug(); |
34 | 34 |
35 #define DEBUG getSVDebug() | 35 #define SVDEBUG getSVDebug() |
36 | 36 |
37 template <typename T> | 37 template <typename T> |
38 inline QDebug &operator<<(QDebug &d, const T &t) { | 38 inline QDebug &operator<<(QDebug &d, const T &t) { |
39 QString s; | 39 QString s; |
40 QTextStream ts(&s); | 40 QTextStream ts(&s); |
55 inline NoDebug &operator<<(const T &) { return *this; } | 55 inline NoDebug &operator<<(const T &) { return *this; } |
56 | 56 |
57 inline NoDebug &operator<<(QTextStreamFunction) { return *this; } | 57 inline NoDebug &operator<<(QTextStreamFunction) { return *this; } |
58 }; | 58 }; |
59 | 59 |
60 #define DEBUG NoDebug() | 60 #define SVDEBUG NoDebug() |
61 | 61 |
62 #endif /* !NDEBUG */ | 62 #endif /* !NDEBUG */ |
63 | 63 |
64 #endif /* !_DEBUG_H_ */ | 64 #endif /* !_DEBUG_H_ */ |
65 | 65 |