diff options
author | Jędrzej Nowacki <jedrzej.nowacki@digia.com> | 2014-07-09 17:42:08 +0200 |
---|---|---|
committer | Jędrzej Nowacki <jedrzej.nowacki@digia.com> | 2014-07-10 13:14:40 +0200 |
commit | 3746eedeab134a228a318c3962718f52e1dfffeb (patch) | |
tree | b029eb461206c3d3b4e514bc216f0ff398563fb5 /tests/auto/other | |
parent | 776ddcab2c6f06d8d66c645eb34038ffaa60e08e (diff) |
Update QVariant tests
Remove old message handler hack as we have a new and better api to
ignore warning messages.
Change-Id: Id967b2672fe3e3638db9977500118a19c2afb730
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'tests/auto/other')
-rw-r--r-- | tests/auto/other/qvariant_common/tst_qvariant_common.h | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/tests/auto/other/qvariant_common/tst_qvariant_common.h b/tests/auto/other/qvariant_common/tst_qvariant_common.h index 7a34d7b0c2..89c8bc777a 100644 --- a/tests/auto/other/qvariant_common/tst_qvariant_common.h +++ b/tests/auto/other/qvariant_common/tst_qvariant_common.h @@ -44,33 +44,6 @@ #include <QString> -struct MessageHandlerInvalidType -{ - MessageHandlerInvalidType() - : oldMsgHandler(qInstallMessageHandler(handler)) - { - ok = false; - } - - ~MessageHandlerInvalidType() - { - qInstallMessageHandler(oldMsgHandler); - } - - QtMessageHandler oldMsgHandler; - - static void handler(QtMsgType type, const QMessageLogContext & /*ctxt*/, const QString &msg) - { - Q_UNUSED(type); - // uint(-1) can be platform dependent so we check only beginning of the message. - ok = msg.startsWith("Trying to construct an instance of an invalid type, type id:"); - QVERIFY2(ok, (QString::fromLatin1("Message is not started correctly: '") + msg + '\'').toLatin1().constData()); - } - static bool ok; -}; -bool MessageHandlerInvalidType::ok; - - class MessageHandler { public: MessageHandler(const int typeId, QtMessageHandler msgHandler = handler) |