I suggest you also do something like this to easily disable debugging:
#ifndef NO_DISPLAY_DEBUG
# define dbg(x) qDebug(#x " is <%s>", _valueOf(x).latin1())
# define dbs(x) qDebug(_valueOf(x))
# define dbp(s, x) qDebug(QString(s).arg(_valueOf(x)))
#else
# define dbg(x)
# define dbs(x)
# define dbp(s, x)
#endif
#ifndef NO_DISPLAY_DEBUG
# define dbg(x) qDebug(#x " is <%s>", _valueOf(x).latin1())
# define dbs(x) qDebug(_valueOf(x))
# define dbp(s, x) qDebug(QString(s).arg(_valueOf(x)))
#else
# define dbg(x)
# define dbs(x)
# define dbp(s, x)
#endif
To copy to clipboard, switch view to plain text mode
I'm not sure about the syntax of the second section, so be prepared for compile errors
Bookmarks