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 <Friedemann.Kleint@digia.com>
bb10
Konstantin Ritt 2013-09-09 03:53:35 +03:00 committed by The Qt Project
parent e5ee6c0094
commit 65343d4c97
1 changed files with 3 additions and 3 deletions

View File

@ -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();