Make QWidget::grab work with graphics effects

Change 071098b08b changed QWidget::render
to work with all paint devices. Before that change, QWidget::grab would
effectively call QWidgetPrivate::render(), since the QWidget::render
overload was just a direct call to the private class implementation.

This change fixes the regression by calling QWidgetPrivate::render()
directly from QWidget::grab().

Task-number: QTBUG-43968
Change-Id: I1aa2fa91c722374612b6cfa76fd0891d168ecac9
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
This commit is contained in:
Paul Olav Tvete 2015-09-21 15:52:13 +02:00 committed by Simon Hausmann
parent 7a1bc0d3ff
commit 9e81fb4df6

View File

@ -5203,7 +5203,7 @@ QPixmap QWidget::grab(const QRect &rectangle)
QPixmap res(r.size());
if (!d->isOpaque)
res.fill(Qt::transparent);
render(&res, QPoint(), QRegion(r), renderFlags);
d->render(&res, QPoint(), QRegion(r), renderFlags);
d->dirtyOpaqueChildren = oldDirtyOpaqueChildren;
return res;