Reenable tst_QQuickItem::simpleFocus and fix warnings.
authorGunnar Sletta <gunnar.sletta@digia.com>
Mon, 28 Jan 2013 07:59:43 +0000 (08:59 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 31 Jan 2013 06:06:06 +0000 (07:06 +0100)
As a result of 1512835ee1425a3e874d2f2dd2b01f1a1ea7b763,
the simpleFocus test now passes on Mac and can be reneabled.
I also took the liberty of making sure windows have a valid
geometry, so that we don't get tons of warnings.

Task-number: QTBUG-24094
Change-Id: I5b8bc82f3f5397110f6e487898d511e810bae59d
Reviewed-by: Alan Alpert <aalpert@rim.com>
tests/auto/quick/qquickitem/tst_qquickitem.cpp

index 2d8db6e..a7343f6 100644 (file)
@@ -175,6 +175,8 @@ private:
     };
 
     void ensureFocus(QWindow *w) {
+        if (w->width() <=0 || w->height() <= 0)
+            w->setGeometry(100, 100, 400, 300);
         w->show();
         w->requestActivate();
         QTest::qWaitForWindowActive(w);
@@ -270,10 +272,6 @@ void tst_qquickitem::simpleFocus()
     QQuickWindow window;
     ensureFocus(&window);
 
-#ifdef Q_OS_MAC
-    QSKIP("QTBUG-24094: fails on Mac OS X 10.7");
-#endif
-
     QTRY_VERIFY(QGuiApplication::focusWindow() == &window);
 
     QQuickItem *l1c1 = new TestItem(window.contentItem());