From 9e81fb4df6809bb2ff909af595ac9e2487760181 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Mon, 21 Sep 2015 15:52:13 +0200 Subject: [PATCH] Make QWidget::grab work with graphics effects Change 071098b08b12fc1af6341ff6d7ba6713e5de1481 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 Reviewed-by: Friedemann Kleint --- src/widgets/kernel/qwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index b9628cfa1e..2c9cc5c07b 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -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;