summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp')
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index 8992a0b051..7ca08993ab 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -9316,10 +9316,15 @@ void tst_QWidget::translucentWidget()
QCOMPARE(actual,expected);
const QWindow *window = label.windowHandle();
- const QSurfaceFormat translucentFormat = window->requestedFormat();
+ const QSurfaceFormat translucentFormat = window->format();
label.setAttribute(Qt::WA_TranslucentBackground, false);
- const QSurfaceFormat opaqueFormat = window->requestedFormat();
- QVERIFY(translucentFormat != opaqueFormat);
+ // Changing WA_TranslucentBackground with an already created native window
+ // has no effect since Qt 5.0 due to the introduction of QWindow et al.
+ // This means that the change must *not* be reflected in the
+ // QSurfaceFormat, because there is no change when it comes to the
+ // underlying native window. Otherwise the state would no longer
+ // describe reality (the native window) See QTBUG-85714.
+ QVERIFY(translucentFormat == window->format());
}
class MaskResizeTestWidget : public QWidget