mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-30 21:34:07 +00:00
Disable GD_DPRINTF() output in Release builds on all systems
Messages printed with GD_DPRINTF() are clearly debug messages. They flood GoldenDict's output with lines like these: some body finished one finished. erasing.. erase done.. one not finished. ====reading 16384 bytes Messages printed to stderr with GD_FDPRINTF() are more important and less frequent => leave them in Release builds.
This commit is contained in:
parent
98b37feac2
commit
1d6b5efeac
12
gddebug.hh
12
gddebug.hh
|
@ -4,11 +4,15 @@
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
|
||||||
#ifdef NO_CONSOLE
|
#ifdef NO_CONSOLE
|
||||||
#define GD_DPRINTF(...) do {} while( 0 )
|
#define GD_DPRINTF(...) do {} while( 0 )
|
||||||
#define GD_FDPRINTF(...) do {} while( 0 )
|
#define GD_FDPRINTF(...) do {} while( 0 )
|
||||||
#else
|
#else
|
||||||
#define GD_DPRINTF(...) printf(__VA_ARGS__)
|
#ifdef NO_GD_DPRINTF
|
||||||
#define GD_FDPRINTF(...) fprintf(__VA_ARGS__)
|
#define GD_DPRINTF(...) do {} while( 0 )
|
||||||
|
#else
|
||||||
|
#define GD_DPRINTF(...) printf(__VA_ARGS__)
|
||||||
|
#endif
|
||||||
|
#define GD_FDPRINTF(...) fprintf(__VA_ARGS__)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void gdWarning(const char *, ...) /* print warning message */
|
void gdWarning(const char *, ...) /* print warning message */
|
||||||
|
|
|
@ -23,7 +23,7 @@ isEmpty( hasGit ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
CONFIG( release, debug|release ) {
|
CONFIG( release, debug|release ) {
|
||||||
DEFINES += NDEBUG
|
DEFINES += NDEBUG NO_GD_DPRINTF
|
||||||
}
|
}
|
||||||
|
|
||||||
# DEPENDPATH += . generators
|
# DEPENDPATH += . generators
|
||||||
|
|
Loading…
Reference in a new issue