aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/examples/tst_examples.cpp
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2012-09-13 14:35:42 +0200
committerQt by Nokia <qt-info@nokia.com>2012-09-14 14:51:47 +0200
commit08444bab1bf25e20837ea47b647a5b1216caa05c (patch)
tree65fc2e90bbf29f22a92deb322bd4a9de939e8e17 /tests/auto/quick/examples/tst_examples.cpp
parent75b9cd92dc5291ce12d8d609c5d721246044ffa0 (diff)
Autotests: Use qInstallMessageHandler
qInstallMsgHandler got deprecated in Qt 5. Change-Id: Icb6423c7d9f7e507ba36376b0af5ad183379c494 Reviewed-by: Martin Jones <martin.r.jones@gmail.com>
Diffstat (limited to 'tests/auto/quick/examples/tst_examples.cpp')
-rw-r--r--tests/auto/quick/examples/tst_examples.cpp10
1 files changed, 5 insertions, 5 deletions
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 <QQmlEngine>
#include <QQmlError>
-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);
}
/*