diff options
Diffstat (limited to 'rbutil/rbutilqt/systrace.cpp')
-rw-r--r-- | rbutil/rbutilqt/systrace.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/systrace.cpp b/rbutil/rbutilqt/systrace.cpp index f713a45d4c..943f34f7b9 100644 --- a/rbutil/rbutilqt/systrace.cpp +++ b/rbutil/rbutilqt/systrace.cpp | |||
@@ -93,6 +93,7 @@ void SysTrace::savePreviousTrace(void) | |||
93 | return; | 93 | return; |
94 | } | 94 | } |
95 | 95 | ||
96 | #if QT_VERSION < 0x050000 | ||
96 | void SysTrace::debug(QtMsgType type, const char* msg) | 97 | void SysTrace::debug(QtMsgType type, const char* msg) |
97 | { | 98 | { |
98 | (void)type; | 99 | (void)type; |
@@ -109,6 +110,25 @@ void SysTrace::debug(QtMsgType type, const char* msg) | |||
109 | repeat++; | 110 | repeat++; |
110 | } | 111 | } |
111 | } | 112 | } |
113 | #else | ||
114 | void SysTrace::debug(QtMsgType type, const QMessageLogContext &context, const QString &msg) | ||
115 | { | ||
116 | (void)type; | ||
117 | QByteArray localMsg = msg.toLocal8Bit(); | ||
118 | if(lastmessage != msg) { | ||
119 | lastmessage = msg; | ||
120 | flush(); | ||
121 | debugbuffer.append(msg + "\n"); | ||
122 | #if !defined(NODEBUG) | ||
123 | fprintf(stderr, "%s\n", localMsg.constData()); | ||
124 | #endif | ||
125 | repeat = 1; | ||
126 | } | ||
127 | else { | ||
128 | repeat++; | ||
129 | } | ||
130 | } | ||
131 | #endif | ||
112 | 132 | ||
113 | void SysTrace::flush(void) | 133 | void SysTrace::flush(void) |
114 | { | 134 | { |