From 1dd4790aeef17f056840bfea6c438075adbaaa03 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 12 Sep 2012 10:42:25 +0200 Subject: Autotests: Use qInstallMessageHandler qInstallMsgHandler got deprecated in Qt 5. Change-Id: Ib36983e66b3a8090b99f14e3fd4e210602a3f018 Reviewed-by: Qt Doc Bot Reviewed-by: Thiago Macieira --- tests/auto/gui/painting/qpainter/tst_qpainter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/auto/gui/painting/qpainter') diff --git a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp index 3d0ec9f425..14e83adfd0 100644 --- a/tests/auto/gui/painting/qpainter/tst_qpainter.cpp +++ b/tests/auto/gui/painting/qpainter/tst_qpainter.cpp @@ -2410,7 +2410,7 @@ public: static bool success; -void porterDuff_warningChecker(QtMsgType type, const char *msg) +void porterDuff_warningChecker(QtMsgType type, const QMessageLogContext &, const QString &msg) { if (type == QtWarningMsg && msg == QLatin1String("QPainter::setCompositionMode: PorterDuff modes not supported on device")) success = false; @@ -2418,7 +2418,7 @@ void porterDuff_warningChecker(QtMsgType type, const char *msg) void tst_QPainter::porterDuff_warning() { - QtMsgHandler old = qInstallMsgHandler(porterDuff_warningChecker); + QtMessageHandler old = qInstallMessageHandler(porterDuff_warningChecker); DummyPaintEngine dummy; QPainter p(&dummy); @@ -2434,7 +2434,7 @@ void tst_QPainter::porterDuff_warning() p.setCompositionMode(QPainter::CompositionMode_DestinationOver); QVERIFY(!success); - QVERIFY(qInstallMsgHandler(old) == porterDuff_warningChecker); + QVERIFY(qInstallMessageHandler(old) == porterDuff_warningChecker); } class quint24 -- cgit v1.2.3