From 93b8cdc974e584d80dbaabf459610a555af25b81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 7 Feb 2020 12:43:40 +0100 Subject: [PATCH] testlib: Make testlogs enumerable and printable Change-Id: Id0ac30fe0a63757ef722634e6dd90806015467aa Reviewed-by: Simon Hausmann --- src/testlib/qtestlog.cpp | 2 ++ src/testlib/qtestlog_p.h | 4 ++++ 2 files changed, 6 insertions(+) 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 #endif +#include + 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();