diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-02-07 12:43:40 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-02-10 15:06:06 +0100 |
commit | 93b8cdc974e584d80dbaabf459610a555af25b81 (patch) | |
tree | 0eeee83dfcfe243af9aed6677e2bddc4ff508b9e /src/testlib | |
parent | 95577150167951c47f25071adade8562fbe91d25 (diff) |
testlib: Make testlogs enumerable and printable
Change-Id: Id0ac30fe0a63757ef722634e6dd90806015467aa
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/testlib')
-rw-r--r-- | src/testlib/qtestlog.cpp | 2 | ||||
-rw-r--r-- | src/testlib/qtestlog_p.h | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/testlib/qtestlog.cpp b/src/testlib/qtestlog.cpp index 7e5f9182b8..7bd108ab00 100644 --- a/src/testlib/qtestlog.cpp +++ b/src/testlib/qtestlog.cpp @@ -597,4 +597,6 @@ qint64 QTestLog::nsecsFunctionTime() return elapsedFunctionTime.nsecsElapsed(); } +#include "moc_qtestlog_p.cpp" + QT_END_NAMESPACE diff --git a/src/testlib/qtestlog_p.h b/src/testlib/qtestlog_p.h index 959aef6968..ddaf14ed9b 100644 --- a/src/testlib/qtestlog_p.h +++ b/src/testlib/qtestlog_p.h @@ -57,6 +57,8 @@ #include <QtCore/private/qcore_mac_p.h> #endif +#include <QtCore/qobjectdefs.h> + QT_BEGIN_NAMESPACE class QBenchmarkResult; @@ -65,6 +67,7 @@ class QTestData; class Q_TESTLIB_EXPORT QTestLog { + Q_GADGET public: QTestLog() = delete; ~QTestLog() = delete; @@ -79,6 +82,7 @@ public: , XCTest #endif }; + Q_ENUM(LogMode); static void enterTestFunction(const char* function); static void leaveTestFunction(); |