CVS commit by adridg: More clarity when printing Q(C)Strings to cerr, mess around with call-trace M +6 -10 options.h 1.50 --- kdepim/kpilot/lib/options.h #1.49:1.50 @@ -117,6 +117,6 @@ using namespace std; #define DEBUGDB std::cerr -inline std::ostream& operator <<(std::ostream &o, const QString &s) { if (s.isEmpty()) return o; else return o<"; else return o<"; else return o << *s; } #else @@ -157,18 +157,14 @@ QString rtExpand(const QString &s, bool #ifdef __GNUC__ #define KPILOT_FNAMEDEF static const char *fname=__FUNCTION__ -#define KPILOT_LOCNDEF debug_spaces+(::strlen(fname)) \ - << "(" << __FILE__ << ":" << \ - __LINE__ << ")\n" +#define KPILOT_LOCNDEF __FILE__ << ":" << __LINE__ #else #define KPILOT_FNAMEDEF static const char *fname=__FILE__ ":" "__LINE__" -#define KPILOT_LOCNDEF "\n" +#define KPILOT_LOCNDEF "" #endif #define FUNCTIONSETUP KPILOT_FNAMEDEF; \ - if (debug_level) { DEBUGFUNC << \ - fname << KPILOT_LOCNDEF ; } + if (debug_level) { DEBUGFUNC << KPILOT_LOCNDEF << ":" << fname << endl; } #define FUNCTIONSETUPL(l) KPILOT_FNAMEDEF; \ - if (debug_level>l) { DEBUGFUNC << \ - fname << KPILOT_LOCNDEF; } + if (debug_level>l) { DEBUGFUNC << KPILOT_LOCNDEF << fname << endl; }