summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAnselmo L. S. Melo <anselmo.melo@openbossa.org>2012-01-20 09:08:42 -0300
committerQt by Nokia <qt-info@nokia.com>2012-01-27 08:57:58 +0100
commit76a5ce8acb4580a63cbeb3852e6d842a8aa2903d (patch)
treebee333d5e8a8c0342a60f2ce239f85f3fd9f4d7c /tests
parent43270da01a7f2295051b5844b645c8bc73480052 (diff)
Implement QWindow::close()
Implement the public slot QWindow::close() and add the correspondent test. Change-Id: If3f07cce3b26640f06fc52d0e4dca875d9894b3d Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
index 91f9e4ef49..a19af79caa 100644
--- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
+++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
@@ -58,6 +58,7 @@ private slots:
void mouseToTouchTranslation();
void mouseToTouchLoop();
void orientation();
+ void close();
void initTestCase()
{
touchDevice = new QTouchDevice;
@@ -503,5 +504,20 @@ void tst_QWindow::orientation()
QCOMPARE(spy.count(), 1);
}
+void tst_QWindow::close()
+{
+ QWindow a;
+ QWindow b;
+ QWindow c(&a);
+
+ a.show();
+ b.show();
+
+ // we can not close a non top level window
+ QVERIFY(!c.close());
+ QVERIFY(a.close());
+ QVERIFY(b.close());
+}
+
#include <tst_qwindow.moc>
QTEST_MAIN(tst_QWindow);