summaryrefslogtreecommitdiffstats
path: root/tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp')
-rw-r--r--tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp b/tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp
index 19adbfd..34611d7 100644
--- a/tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp
+++ b/tests/auto/qdesktopwidget/tst_qdesktopwidget.cpp
@@ -99,9 +99,17 @@ void tst_QDesktopWidget::availableGeometry()
{
QDesktopWidget desktop;
- QRect total = desktop.screenGeometry();
- QRect available = desktop.availableGeometry();
+ QRect total;
+ QRect available;
+ for (int i = 0; i < desktop.screenCount(); ++i) {
+ total = desktop.screenGeometry(i);
+ available = desktop.availableGeometry(i);
+ QVERIFY(total.contains(available));
+ }
+
+ total = desktop.screenGeometry();
+ available = desktop.availableGeometry();
QVERIFY(total.contains(available));
QCOMPARE(desktop.availableGeometry(desktop.primaryScreen()), available);
QCOMPARE(desktop.screenGeometry(desktop.primaryScreen()), total);