aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlcomponent
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/qqmlcomponent
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/qqmlcomponent')
-rw-r--r--tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp b/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp
index 3a3952d101..01cec58f0e 100644
--- a/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp
+++ b/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp
@@ -227,9 +227,9 @@ void tst_qqmlcomponent::qmlCreateObjectWithProperties()
}
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_qqmlcomponent::qmlCreateParentReference()
@@ -239,7 +239,7 @@ void tst_qqmlcomponent::qmlCreateParentReference()
QCOMPARE(engine.outputWarningsToStandardError(), true);
warnings.clear();
- QtMsgHandler old = qInstallMsgHandler(msgHandler);
+ QtMessageHandler old = qInstallMessageHandler(msgHandler);
QQmlComponent component(&engine, testFileUrl("createParentReference.qml"));
QVERIFY2(component.errorString().isEmpty(), component.errorString().toUtf8());
@@ -249,7 +249,7 @@ void tst_qqmlcomponent::qmlCreateParentReference()
QVERIFY(QMetaObject::invokeMethod(object, "createChild"));
delete object;
- qInstallMsgHandler(old);
+ qInstallMessageHandler(old);
engine.setOutputWarningsToStandardError(false);
QCOMPARE(engine.outputWarningsToStandardError(), false);
@@ -399,12 +399,12 @@ void tst_qqmlcomponent::onDestructionCount()
QCOMPARE(engine.outputWarningsToStandardError(), true);
warnings.clear();
- QtMsgHandler old = qInstallMsgHandler(msgHandler);
+ QtMessageHandler old = qInstallMessageHandler(msgHandler);
QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
QCoreApplication::processEvents();
- qInstallMsgHandler(old);
+ qInstallMessageHandler(old);
engine.setOutputWarningsToStandardError(false);
QCOMPARE(engine.outputWarningsToStandardError(), false);