From 65343d4c9744f648dc0de41124c5c5083dae0551 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Mon, 9 Sep 2013 03:53:35 +0300 Subject: Fix QPainter usage in non-GUI thread warning appearing in debug The third parameter is `extraCondition`, which is false by default, and it is used in condition `if (!extraCondition && QThread::currentThread() != qApp->thread()) {`. Passing extraCondition=true makes this condition always evaluate to false and thus hides a respective warning at all. Change-Id: Ia8ef48f341bd22f58375034d1992da716f78121d Reviewed-by: Friedemann Kleint --- src/gui/painting/qpainter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index d36a2d46f8..64c07a8f4e 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -5052,7 +5052,7 @@ void QPainter::drawPixmap(const QPointF &p, const QPixmap &pm) return; #ifndef QT_NO_DEBUG - qt_painter_thread_test(d->device->devType(), "drawPixmap()", true); + qt_painter_thread_test(d->device->devType(), "drawPixmap()"); #endif if (d->extended) { @@ -5123,7 +5123,7 @@ void QPainter::drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr) if (!d->engine || pm.isNull()) return; #ifndef QT_NO_DEBUG - qt_painter_thread_test(d->device->devType(), "drawPixmap()", true); + qt_painter_thread_test(d->device->devType(), "drawPixmap()"); #endif qreal x = r.x(); @@ -6618,7 +6618,7 @@ void QPainter::drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPo return; #ifndef QT_NO_DEBUG - qt_painter_thread_test(d->device->devType(), "drawTiledPixmap()", true); + qt_painter_thread_test(d->device->devType(), "drawTiledPixmap()"); #endif qreal sw = pixmap.width(); -- cgit v1.2.3