From b56caf5f4e50d867bfef4b9090b1fba130284688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Mon, 25 Feb 2013 08:54:30 +0100 Subject: Introduced QWindow::setMask() to expose existing platform functionality. Task-number: QTBUG-28555 Change-Id: I2c649b6d9e9dc69be246cb7658b3edbe9682b1bf Reviewed-by: Friedemann Kleint Reviewed-by: Gunnar Sletta --- tests/auto/gui/kernel/qwindow/tst_qwindow.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests') diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp index 02f8584f72..b67920737e 100644 --- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp +++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp @@ -77,6 +77,7 @@ private slots: void tabletEvents(); void windowModality_QTBUG27039(); void visibility(); + void mask(); void initTestCase() { @@ -1119,6 +1120,22 @@ void tst_QWindow::visibility() spy.clear(); } +void tst_QWindow::mask() +{ + QRegion mask = QRect(10, 10, 800 - 20, 600 - 20); + + QWindow window; + window.resize(800, 600); + window.setMask(mask); + + QCOMPARE(window.mask(), QRegion()); + + window.create(); + window.setMask(mask); + + QCOMPARE(window.mask(), mask); +} + #include QTEST_MAIN(tst_QWindow) -- cgit v1.2.3