From aa6d27f043f0367ea4c16bb255f65b2a6abb5921 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 13 Sep 2012 14:47:47 +0200 Subject: Use qInstallMessageHandler qInstallMsgHandler got deprecated in Qt 5. Change-Id: I87f5f8d5b28afcbcf8a9c613d1d4b1199f5f4254 Reviewed-by: Martin Jones --- .../tst_qdeclarativeecmascript.cpp | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'tests/auto/declarative/qdeclarativeecmascript') diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index 61d04985..c7751237 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -1210,7 +1210,7 @@ void tst_qdeclarativeecmascript::exceptionBindingProducesWarning() } static int transientErrorsMsgCount = 0; -static void transientErrorsMsgHandler(QtMsgType, const char *) +static void transientErrorsMsgHandler(QtMsgType, const QMessageLogContext &, const QString &) { ++transientErrorsMsgCount; } @@ -1222,12 +1222,12 @@ void tst_qdeclarativeecmascript::transientErrors() QDeclarativeComponent component(&engine, testFileUrl("transientErrors.qml")); transientErrorsMsgCount = 0; - QtMsgHandler old = qInstallMsgHandler(transientErrorsMsgHandler); + QtMessageHandler old = qInstallMessageHandler(transientErrorsMsgHandler); QObject *object = component.create(); QVERIFY(object != 0); - qInstallMsgHandler(old); + qInstallMessageHandler(old); QCOMPARE(transientErrorsMsgCount, 0); } @@ -1237,12 +1237,12 @@ void tst_qdeclarativeecmascript::transientErrors() QDeclarativeComponent component(&engine, testFileUrl("transientErrors.2.qml")); transientErrorsMsgCount = 0; - QtMsgHandler old = qInstallMsgHandler(transientErrorsMsgHandler); + QtMessageHandler old = qInstallMessageHandler(transientErrorsMsgHandler); QObject *object = component.create(); QVERIFY(object != 0); - qInstallMsgHandler(old); + qInstallMessageHandler(old); QCOMPARE(transientErrorsMsgCount, 0); } @@ -1256,11 +1256,11 @@ void tst_qdeclarativeecmascript::shutdownErrors() QVERIFY(object != 0); transientErrorsMsgCount = 0; - QtMsgHandler old = qInstallMsgHandler(transientErrorsMsgHandler); + QtMessageHandler old = qInstallMessageHandler(transientErrorsMsgHandler); delete object; - qInstallMsgHandler(old); + qInstallMessageHandler(old); QCOMPARE(transientErrorsMsgCount, 0); } @@ -2457,11 +2457,11 @@ void tst_qdeclarativeecmascript::qtbug_9792() delete context; transientErrorsMsgCount = 0; - QtMsgHandler old = qInstallMsgHandler(transientErrorsMsgHandler); + QtMessageHandler old = qInstallMessageHandler(transientErrorsMsgHandler); object->basicSignal(); - qInstallMsgHandler(old); + qInstallMessageHandler(old); QCOMPARE(transientErrorsMsgCount, 0); @@ -2498,11 +2498,11 @@ void tst_qdeclarativeecmascript::noSpuriousWarningsAtShutdown() QObject *o = component.create(); transientErrorsMsgCount = 0; - QtMsgHandler old = qInstallMsgHandler(transientErrorsMsgHandler); + QtMessageHandler old = qInstallMessageHandler(transientErrorsMsgHandler); delete o; - qInstallMsgHandler(old); + qInstallMessageHandler(old); QCOMPARE(transientErrorsMsgCount, 0); } @@ -2514,11 +2514,11 @@ void tst_qdeclarativeecmascript::noSpuriousWarningsAtShutdown() QObject *o = component.create(); transientErrorsMsgCount = 0; - QtMsgHandler old = qInstallMsgHandler(transientErrorsMsgHandler); + QtMessageHandler old = qInstallMessageHandler(transientErrorsMsgHandler); delete o; - qInstallMsgHandler(old); + qInstallMessageHandler(old); QCOMPARE(transientErrorsMsgCount, 0); } -- cgit v1.2.3