summaryrefslogtreecommitdiffstats
path: root/tests/auto/qdesktopwidget
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-03-09 12:16:40 (GMT)
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-03-09 12:16:40 (GMT)
commit2b288ace6fb5747158609ac484268c29b30108e5 (patch)
tree7a05df68709986f9ebf5d9d2453e57e4d3b41e7a /tests/auto/qdesktopwidget
parent3d946b24834973816b4f472828c03bc07b10b3ac (diff)
downloadQt-2b288ace6fb5747158609ac484268c29b30108e5.zip
Qt-2b288ace6fb5747158609ac484268c29b30108e5.tar.gz
Qt-2b288ace6fb5747158609ac484268c29b30108e5.tar.bz2
Multiple screen support for Symbian in QDeskopWidget.
When using TV-out, the TV display can be used as an independent screen. By default the content shown there is a clone of the device screen, however from now on parenting a widget to QDesktopWidget::screen(1) and calling show() will turn off cloning and have the widget shown instead. screenCount() and the screenCountChanged signal can be used to detect the availability of the secondary display, just like on other platforms. Task-number: QT-830 Reviewed-by: Sami Merila Reviewed-by: Jani Hautakangas
Diffstat (limited to 'tests/auto/qdesktopwidget')
-rw-r--r--tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp b/tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp
index 0256b82..f66b849 100644
--- a/tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp
+++ b/tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp
@@ -127,7 +127,7 @@ void tst_QDesktopWidget::screenNumberForQWidget()
QWidget widget;
widget.show();
- QApplication::processEvents();
+ QTest::qWaitForWindowShown(&widget);
QVERIFY(widget.isVisible());
int widgetScreen = desktop.screenNumber(&widget);
@@ -142,7 +142,9 @@ void tst_QDesktopWidget::screenNumberForQPoint()
QRect allScreens;
for (int i = 0; i < desktopWidget->numScreens(); ++i) {
QRect screenGeometry = desktopWidget->screenGeometry(i);
+#if !defined(Q_OS_SYMBIAN)
QCOMPARE(desktopWidget->screenNumber(screenGeometry.center()), i);
+#endif
allScreens |= screenGeometry;
}
@@ -180,7 +182,6 @@ void tst_QDesktopWidget::screenGeometry()
total = desktopWidget->screenGeometry(i);
available = desktopWidget->availableGeometry(i);
}
- QVERIFY(total.contains(r));
}
QTEST_MAIN(tst_QDesktopWidget)