57 # define devf(...) doDevf (__func__, __VA_ARGS__); |
57 # define devf(...) doDevf (__func__, __VA_ARGS__); |
58 #else |
58 #else |
59 # define devf(...) |
59 # define devf(...) |
60 #endif // RELEASE |
60 #endif // RELEASE |
61 |
61 |
|
62 class QFile; |
|
63 extern QFile g_file_stdout; |
|
64 extern QFile g_file_stderr; |
|
65 |
62 void doDevf (const char* func, const char* fmtstr, ...); |
66 void doDevf (const char* func, const char* fmtstr, ...); |
63 |
67 |
64 // Version string identifier |
68 // Version string identifier |
65 str versionString (); |
69 str versionString (); |
66 const char* versionMoniker (); |
70 const char* versionMoniker (); |
137 #define FUNCNAME __PRETTY_FUNCTION__ |
141 #define FUNCNAME __PRETTY_FUNCTION__ |
138 #else |
142 #else |
139 #define FUNCNAME __func__ |
143 #define FUNCNAME __func__ |
140 #endif // __GNUC__ |
144 #endif // __GNUC__ |
141 |
145 |
|
146 // printf replacement |
|
147 #ifndef IN_IDE_PARSER |
|
148 #define print(...) doPrint (g_file_stdout, {__VA_ARGS__}) |
|
149 #define fprint(F, ...) doPrint (F, {__VA_ARGS__}) |
|
150 #else |
|
151 void print (const char* fmtstr, ...); |
|
152 void fprint (QFile& f, const char* fmtstr, ...); |
|
153 #endif |
|
154 void doPrint (QFile& f, initlist<StringFormatArg> args); |
|
155 void doPrint (FILE* f, initlist<StringFormatArg> args); |
|
156 |
142 // Replace assert with a version that shows a GUI dialog if possible |
157 // Replace assert with a version that shows a GUI dialog if possible |
143 #ifdef assert |
158 #ifdef assert |
144 #undef assert |
159 #undef assert |
145 #endif // assert |
160 #endif // assert |
146 |
161 |