aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlengine
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/qml/qqmlengine
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/qml/qqmlengine')
-rw-r--r--tests/auto/qml/qqmlengine/tst_qqmlengine.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp
index c9d3e27afe..3b565bc31c 100644
--- a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp
+++ b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp
@@ -418,9 +418,9 @@ void tst_qqmlengine::failedCompilation_data()
}
static QStringList warnings;
-static void msgHandler(QtMsgType, const char *warning)
+static void msgHandler(QtMsgType, const QMessageLogContext &, const QString &warning)
{
- warnings << QString::fromUtf8(warning);
+ warnings << warning;
}
void tst_qqmlengine::outputWarningsToStandardError()
@@ -435,11 +435,11 @@ void tst_qqmlengine::outputWarningsToStandardError()
QVERIFY(c.isReady() == true);
warnings.clear();
- QtMsgHandler old = qInstallMsgHandler(msgHandler);
+ QtMessageHandler old = qInstallMessageHandler(msgHandler);
QObject *o = c.create();
- qInstallMsgHandler(old);
+ qInstallMessageHandler(old);
QVERIFY(o != 0);
delete o;
@@ -453,11 +453,11 @@ void tst_qqmlengine::outputWarningsToStandardError()
QCOMPARE(engine.outputWarningsToStandardError(), false);
- old = qInstallMsgHandler(msgHandler);
+ old = qInstallMessageHandler(msgHandler);
o = c.create();
- qInstallMsgHandler(old);
+ qInstallMessageHandler(old);
QVERIFY(o != 0);
delete o;