diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2012-09-13 14:35:42 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-09-14 14:51:47 +0200 |
commit | 08444bab1bf25e20837ea47b647a5b1216caa05c (patch) | |
tree | 65fc2e90bbf29f22a92deb322bd4a9de939e8e17 /tests/auto/quick/qquickimage | |
parent | 75b9cd92dc5291ce12d8d609c5d721246044ffa0 (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/qquickimage')
-rw-r--r-- | tests/auto/quick/qquickimage/tst_qquickimage.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/quick/qquickimage/tst_qquickimage.cpp b/tests/auto/quick/qquickimage/tst_qquickimage.cpp index a8f92cbfa5..49ea9d03cf 100644 --- a/tests/auto/quick/qquickimage/tst_qquickimage.cpp +++ b/tests/auto/quick/qquickimage/tst_qquickimage.cpp @@ -662,9 +662,9 @@ void tst_qquickimage::sourceSize_QTBUG_16389() } static int numberOfWarnings = 0; -static void checkWarnings(QtMsgType, const char *msg) +static void checkWarnings(QtMsgType, const QMessageLogContext &, const QString &msg) { - if (!QString(msg).contains("QGLContext::makeCurrent(): Failed.")) + if (!msg.contains("QGLContext::makeCurrent(): Failed.")) numberOfWarnings++; } @@ -679,11 +679,11 @@ void tst_qquickimage::nullPixmapPaint() QTRY_VERIFY(image != 0); image->setSource(SERVER_ADDR + QString("/no-such-file.png")); - QtMsgHandler previousMsgHandler = qInstallMsgHandler(checkWarnings); + QtMessageHandler previousMsgHandler = qInstallMessageHandler(checkWarnings); // used to print "QTransform::translate with NaN called" QPixmap pm = QPixmap::fromImage(window->grabWindow()); - qInstallMsgHandler(previousMsgHandler); + qInstallMessageHandler(previousMsgHandler); QVERIFY(numberOfWarnings == 0); delete image; |