summaryrefslogtreecommitdiffstats
path: root/tests/auto/other/qvariant_common/tst_qvariant_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/other/qvariant_common/tst_qvariant_common.h')
-rw-r--r--tests/auto/other/qvariant_common/tst_qvariant_common.h27
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)