summaryrefslogtreecommitdiffstats
path: root/tests/auto/other
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-04-16 17:42:00 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-04-29 06:20:07 +0200
commit0fda43cf33cc7715f16d8764c4d96c6f88238712 (patch)
treec693c9ce99f1f02f8ec5de204cfe93bf1517b105 /tests/auto/other
parent0303d8ddfa968e0c5a9ac08a12836ea3f34d4088 (diff)
Remove deprecated members from QtGui/image classes
Cleaning up those that are trivial to remove because they have direct replacements. Change-Id: I4f5c25884a01474fa2db8b369f0d883bd21edd5b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tests/auto/other')
-rw-r--r--tests/auto/other/macgui/tst_macgui.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/auto/other/macgui/tst_macgui.cpp b/tests/auto/other/macgui/tst_macgui.cpp
index 75fa4815c9..56d698aa8f 100644
--- a/tests/auto/other/macgui/tst_macgui.cpp
+++ b/tests/auto/other/macgui/tst_macgui.cpp
@@ -34,6 +34,7 @@
#include <QScrollBar>
#include <QProgressDialog>
#include <QSpinBox>
+#include <QScreen>
#include <guitest.h>
@@ -53,7 +54,12 @@ private slots:
QPixmap grabWindowContents(QWidget * widget)
{
- return QPixmap::grabWindow(widget->winId());
+ QScreen *screen = widget->window()->windowHandle()->screen();
+ if (!screen) {
+ qWarning() << "Grabbing pixmap failed, no QScreen for" << widget;
+ return QPixmap();
+ }
+ return screen->grabWindow(widget->winId());
}
/*