diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2012-09-13 14:47:47 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-09-14 14:51:39 +0200 |
commit | aa6d27f043f0367ea4c16bb255f65b2a6abb5921 (patch) | |
tree | 663c468830121f3cd3abc8a85a9cae3a2b7a8311 /tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp | |
parent | cf5b6c3ef72df623117678de01fd5557861ba73b (diff) |
Use qInstallMessageHandler
qInstallMsgHandler got deprecated in Qt 5.
Change-Id: I87f5f8d5b28afcbcf8a9c613d1d4b1199f5f4254
Reviewed-by: Martin Jones <martin.r.jones@gmail.com>
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp')
-rw-r--r-- | tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
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); } |