From: Gunnar Sletta Date: Mon, 28 Jan 2013 07:59:43 +0000 (+0100) Subject: Reenable tst_QQuickItem::simpleFocus and fix warnings. X-Git-Tag: upstream/5.2.1~930 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=08a83c42ad441044c669c909fecd80529d02df5a;p=platform%2Fupstream%2Fqtdeclarative.git Reenable tst_QQuickItem::simpleFocus and fix warnings. 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 --- diff --git a/tests/auto/quick/qquickitem/tst_qquickitem.cpp b/tests/auto/quick/qquickitem/tst_qquickitem.cpp index 2d8db6e..a7343f6 100644 --- a/tests/auto/quick/qquickitem/tst_qquickitem.cpp +++ b/tests/auto/quick/qquickitem/tst_qquickitem.cpp @@ -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());