diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2010-03-11 08:21:15 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2010-03-11 08:21:15 (GMT) |
commit | 327c36acdba0422e93d99dc71cb3f5238d326977 (patch) | |
tree | d85c7b186af9a9324bb4acc5e36d630966876fee /tests/auto/qwidget | |
parent | b9f8c1491550fe671d1809481ad7f70737034a3b (diff) | |
parent | 16e8cc808ae7087aadd95855c97d715941711b45 (diff) | |
download | Qt-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.cpp | 10 |
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()); |