diff options
author | Giorgos Tsiapaliokas <terietor@gmail.com> | 2013-10-23 16:47:30 +0300 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-07 12:20:24 +0100 |
commit | 6e5caf0431f63a8b67b4d787ba02d8684dbaa856 (patch) | |
tree | 391ed483672d3b5a412e1e7dd992645e2012292d /tests/auto/qml/qqmlconsole | |
parent | 9c4cba80e4849dfe3f445b711381df4b0e7dbfc3 (diff) |
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 <kai.koehne@digia.com>
Diffstat (limited to 'tests/auto/qml/qqmlconsole')
-rw-r--r-- | tests/auto/qml/qqmlconsole/tst_qqmlconsole.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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 <QDebug> #include <QQmlEngine> #include <QQmlComponent> +#include <QLoggingCategory> #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"); |