qt6-bb10/tests/auto/widgets/kernel
Jan Arve Saether de1b98e9c1 Fallback to QWidget::grab() if QScreen::grabWindow() fails.
QScreen::grabWindow() is not always reliable because it grabs from the
framebuffer. (The window might then be covered by other windows, e.g.
"Stays on top"-Windows, popups etc).
If QScreen::grabWindow() fails we therefore fallback to
QWidget::grab(). This will not grab from the frame buffer, but it will
ask the widget to render itself (with its current state) to a pixmap
and return it.
QWidget::grab() should usually return the expected pixmap, and the
pixmap it gives is not subject to the state of the window manager.

This means that both QScreen::grabWindow() *and* QWidget::grab()
must produce an unexpected pixmap in order for the test to fail.

Change-Id: I276554155bb1e5b510d2a2d43628d91669464fe2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-02-07 23:52:49 +01:00
..
qaction QtWidgets tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-28 02:02:14 +01:00
qactiongroup QtWidgets tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-28 02:02:14 +01:00
qapplication expand tabs and related whitespace fixes in *.{cpp,h,qdoc} 2014-01-13 22:46:50 +01:00
qboxlayout Add widget replace function to QLayout 2013-09-21 23:17:55 +02:00
qdesktopwidget QtWidgets tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-28 02:02:14 +01:00
qformlayout expand tabs and related whitespace fixes in *.{cpp,h,qdoc} 2014-01-13 22:46:50 +01:00
qgridlayout expand tabs and related whitespace fixes in *.{cpp,h,qdoc} 2014-01-13 22:46:50 +01:00
qlayout QSizePolicy - add retainSizeWhenHidden 2013-07-10 09:26:31 +02:00
qshortcut expand tabs and related whitespace fixes in *.{cpp,h,qdoc} 2014-01-13 22:46:50 +01:00
qsizepolicy QtWidgets tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-28 02:02:14 +01:00
qstackedlayout Add widget replace function to QLayout 2013-09-21 23:17:55 +02:00
qtooltip QtWidgets tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-28 02:02:14 +01:00
qwidget Fallback to QWidget::grab() if QScreen::grabWindow() fails. 2014-02-07 23:52:49 +01:00
qwidget_window Avoid crash due to accessing deleted QWidgetWindow object 2013-12-24 02:56:41 +01:00
qwidgetaction QtWidgets tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-28 02:02:14 +01:00
qwidgetmetatype QtWidgets tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-28 02:02:14 +01:00
qwidgetsvariant QtWidgets tests: Remove DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0 2013-03-28 02:02:14 +01:00
qwindowcontainer Fix crash when windowcontainer is used in a dockwidget 2013-11-20 14:10:37 +01:00
kernel.pro Introducing QWidget::createWindowContainer() 2013-01-25 14:11:07 +01:00