diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2014-12-17 21:07:24 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2014-12-18 22:17:36 +0100 |
commit | 0cd1ed0883e067edab24006b23fb1c663ba62041 (patch) | |
tree | d252d174c462320f6fb4817632e2d5331511917f /tests/auto/corelib | |
parent | 622df95fee5ddea737ae3030dbae1286ffd4a454 (diff) |
Fix running tst_qmessagehandler when QT_MESSAGE_PATTERN is set
This test fails if the environment has the variable set.
Change-Id: Ibd54ff3e6e22a885341898889088ac56e84282b1
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'tests/auto/corelib')
-rw-r--r-- | tests/auto/corelib/global/qlogging/tst_qlogging.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp index 749c7da789..68b1fef71d 100644 --- a/tests/auto/corelib/global/qlogging/tst_qlogging.cpp +++ b/tests/auto/corelib/global/qlogging/tst_qlogging.cpp @@ -40,6 +40,9 @@ class tst_qmessagehandler : public QObject { Q_OBJECT +public: + tst_qmessagehandler(); + public slots: void initTestCase(); @@ -92,6 +95,12 @@ void customMsgHandler(QtMsgType type, const char *msg) s_message = QString::fromLocal8Bit(msg); } +tst_qmessagehandler::tst_qmessagehandler() +{ + // ensure it's unset, otherwise we'll have trouble + qputenv("QT_MESSAGE_PATTERN", ""); +} + void tst_qmessagehandler::initTestCase() { m_appDir = QFINDTESTDATA("app"); |