summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@digia.com>2013-01-10 16:15:05 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-20 23:45:06 +0200
commit3efca77e35c0c336961f5e9640382ef87e83e794 (patch)
tree0b57aabfb4b3b4cf793f484fb555a09d91cde457 /tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp
parent99f9bf9af68530302fcb5a920f477a224adc0e09 (diff)
Import qlogger framework
Merge most parts of the qlogger framework from git://gitorious.org/qtplayground/qlogger.git The categorized logging feature is a replacement for qDebug, qWarning and friends. With logging statements in an app/library, a developer can turn on the statements they care about and turn off the ones they don't. Most work for this was done by Wolfgang Beck and Lincoln Ramsay. Task-number: QTBUG-25694 Change-Id: Ib0cdfbbf3694f86ad9ec553b2ea36f09a477cded Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp')
-rw-r--r--tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp b/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp
index becff75836..157e42b447 100644
--- a/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp
+++ b/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp
@@ -49,6 +49,7 @@
#include <QtCore/QtCore>
#include <QtCore/QtDebug>
+#include <QtCore/QLoggingCategory>
#include <QtTest/QtTest>
class tst_QNoDebug: public QObject
@@ -61,12 +62,16 @@ private slots:
void tst_QNoDebug::noDebugOutput() const
{
+ QLoggingCategory cat("custom");
// should do nothing
qDebug() << "foo";
+ qCDebug(cat) << "foo";
// qWarning still works, though
QTest::ignoreMessage(QtWarningMsg, "bar ");
+ QTest::ignoreMessage(QtWarningMsg, "custom-bar ");
qWarning() << "bar";
+ qCWarning(cat) << "custom-bar";
}
void tst_QNoDebug::streaming() const