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
parent
e5ee6c0094
commit
65343d4c97
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue