summaryrefslogtreecommitdiffstats
path: root/tests/auto/qwidget
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2010-03-11 08:21:15 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2010-03-11 08:21:15 (GMT)
commit327c36acdba0422e93d99dc71cb3f5238d326977 (patch)
treed85c7b186af9a9324bb4acc5e36d630966876fee /tests/auto/qwidget
parentb9f8c1491550fe671d1809481ad7f70737034a3b (diff)
parent16e8cc808ae7087aadd95855c97d715941711b45 (diff)
downloadQt-327c36acdba0422e93d99dc71cb3f5238d326977.zip
Qt-327c36acdba0422e93d99dc71cb3f5238d326977.tar.gz
Qt-327c36acdba0422e93d99dc71cb3f5238d326977.tar.bz2
Merge remote branch 'origin/4.7' into 4.7-lighthouse
Conflicts: src/gui/kernel/qapplication.cpp src/gui/kernel/qapplication_p.h src/gui/kernel/qwidget.cpp
Diffstat (limited to 'tests/auto/qwidget')
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index a574ace..a94b9d7 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -8832,7 +8832,15 @@ void tst_QWidget::translucentWidget()
#endif
QTest::qWait(200);
- QPixmap widgetSnapshot = QPixmap::grabWindow(label.winId());
+ QPixmap widgetSnapshot;
+
+#ifdef Q_WS_WIN
+ QWidget *desktopWidget = QApplication::desktop()->screen(0);
+ if (QSysInfo::windowsVersion() >= QSysInfo::WV_VISTA)
+ widgetSnapshot = QPixmap::grabWindow(desktopWidget->winId(), 0,0, label.width(), label.height());
+ else
+#endif
+ widgetSnapshot = QPixmap::grabWindow(label.winId());
QImage actual = widgetSnapshot.toImage().convertToFormat(QImage::Format_RGB32);
QImage expected = pm.toImage().convertToFormat(QImage::Format_RGB32);
QCOMPARE(actual.size(),expected.size());