From 6e5caf0431f63a8b67b4d787ba02d8684dbaa856 Mon Sep 17 00:00:00 2001 From: Giorgos Tsiapaliokas Date: Wed, 23 Oct 2013 16:47:30 +0300 Subject: Add the features of QLoggingCategory to QML's debugging methods. It is now possible to modify the output of QML's debugging methods. Also the prefix of "qml" makes it possible to capture the output from the QML files using qInstallMessageHandler. This commit depends on qtbase/4967c7106568d5df0be4d40bf793583c7c6bdb69 Change-Id: I2c7a2cb96a0b91fd3249dc2dacbab63e6ac68243 Reviewed-by: Kai Koehne --- tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/auto/qml/qqmlconsole') diff --git a/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp b/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp index 43aa82e1e4..42c6578338 100644 --- a/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp +++ b/tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include "../../shared/util.h" class tst_qqmlconsole : public QQmlDataTest @@ -65,6 +66,11 @@ void tst_qqmlconsole::logging() { QUrl testUrl = testFileUrl("logging.qml"); + QLoggingCategory loggingCategory("qml"); + QVERIFY(loggingCategory.isDebugEnabled()); + QVERIFY(loggingCategory.isWarningEnabled()); + QVERIFY(loggingCategory.isCriticalEnabled()); + QTest::ignoreMessage(QtDebugMsg, "console.debug"); QTest::ignoreMessage(QtDebugMsg, "console.log"); QTest::ignoreMessage(QtDebugMsg, "console.info"); -- cgit v1.2.3