summaryrefslogtreecommitdiffstats
path: root/src/testlib/qabstracttestlogger_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/testlib/qabstracttestlogger_p.h')
-rw-r--r--src/testlib/qabstracttestlogger_p.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/testlib/qabstracttestlogger_p.h b/src/testlib/qabstracttestlogger_p.h
index a0e8a1e..588184e 100644
--- a/src/testlib/qabstracttestlogger_p.h
+++ b/src/testlib/qabstracttestlogger_p.h
@@ -99,6 +99,42 @@ public:
static bool isTtyOutput();
};
+struct QTestCharBuffer
+{
+ inline QTestCharBuffer()
+ : buf(0)
+ {}
+
+ inline ~QTestCharBuffer()
+ {
+ delete[] buf;
+ buf = 0;
+ }
+
+ inline operator void*()
+ {
+ return buf;
+ }
+
+ inline operator char*()
+ {
+ return buf;
+ }
+
+ inline operator char**()
+ {
+ return &buf;
+ }
+
+ inline const char* constData() const
+ {
+ return buf;
+ }
+
+private:
+ char* buf;
+};
+
QT_END_NAMESPACE
#endif