From 08444bab1bf25e20837ea47b647a5b1216caa05c Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 13 Sep 2012 14:35:42 +0200 Subject: Autotests: Use qInstallMessageHandler qInstallMsgHandler got deprecated in Qt 5. Change-Id: Icb6423c7d9f7e507ba36376b0af5ad183379c494 Reviewed-by: Martin Jones --- tests/auto/quick/examples/tst_examples.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/auto/quick/examples') diff --git a/tests/auto/quick/examples/tst_examples.cpp b/tests/auto/quick/examples/tst_examples.cpp index f9994a76bc..b9ebb15abb 100644 --- a/tests/auto/quick/examples/tst_examples.cpp +++ b/tests/auto/quick/examples/tst_examples.cpp @@ -50,11 +50,11 @@ #include #include -static QtMsgHandler testlibMsgHandler = 0; -void msgHandlerFilter(QtMsgType type, const char *msg) +static QtMessageHandler testlibMsgHandler = 0; +void msgHandlerFilter(QtMsgType type, const QMessageLogContext &ctxt, const QString &msg) { if (type == QtCriticalMsg || type == QtFatalMsg) - (*testlibMsgHandler)(type, msg); + (*testlibMsgHandler)(type, ctxt, msg); } class tst_examples : public QObject @@ -129,13 +129,13 @@ tst_examples::~tst_examples() void tst_examples::init() { if (!qstrcmp(QTest::currentTestFunction(), "sgsnippets")) - testlibMsgHandler = qInstallMsgHandler(msgHandlerFilter); + testlibMsgHandler = qInstallMessageHandler(msgHandlerFilter); } void tst_examples::cleanup() { if (!qstrcmp(QTest::currentTestFunction(), "sgsnippets")) - qInstallMsgHandler(testlibMsgHandler); + qInstallMessageHandler(testlibMsgHandler); } /* -- cgit v1.2.3