From 94ac17c2ccbe3b3f3671848afda9430be214f8d5 Mon Sep 17 00:00:00 2001 From: aavit Date: Fri, 17 Aug 2012 14:15:36 +0200 Subject: Clean up QScreen::grabWindow() Handle 0 WId parameter as meaning "desktop window"/whole screen. Also, re-add the default values for the grab area, both for convenience and compatibility with QPixmap::grabWindow() in Qt4. Update the screenshot example so it doesn't comlain about usage of deprecated QPixmap::grabWindow(). Change-Id: I2ad229113ddb8ded0388f2ebc0e8c703c6657f1f Reviewed-by: Gunnar Sletta --- src/gui/kernel/qscreen.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui') diff --git a/src/gui/kernel/qscreen.h b/src/gui/kernel/qscreen.h index 6c142162fe..2d88413ad6 100644 --- a/src/gui/kernel/qscreen.h +++ b/src/gui/kernel/qscreen.h @@ -129,7 +129,7 @@ public: bool isPortrait(Qt::ScreenOrientation orientation) const; bool isLandscape(Qt::ScreenOrientation orientation) const; - QPixmap grabWindow(WId window, int x, int y, int w, int h); + QPixmap grabWindow(WId window, int x = 0, int y = 0, int w = -1, int h = -1); qreal refreshRate() const; -- cgit v1.2.3