QVERIFY(!findItem<QQuickItem>(contentItem, "wrapper", 10));
gridview->setHeight(320);
+
#ifdef Q_OS_MAC
- QEXPECT_FAIL("", "QTBUG-23480", Abort);
+ QSKIP("QTBUG-21590 view does not reliably receive polish without a running animation");
#endif
+
QTRY_VERIFY(findItem<QQuickItem>(contentItem, "wrapper", 10));
gridview->setHeight(100);
{
Q_OBJECT
public:
- TestPolishItem(QQuickItem *parent)
+ TestPolishItem(QQuickItem *parent = 0)
: QQuickItem(parent), wasPolished(false) {
- QTimer::singleShot(10, this, SLOT(doPolish()));
+
}
bool wasPolished;
public:
private slots:
+ void initTestCase();
+
void noCanvas();
void simpleFocus();
void scopedFocus();
void mouseGrab();
void polishOutsideAnimation();
+ void polishOnCompleted();
void wheelEvent_data();
void wheelEvent();
}
};
+void tst_qquickitem::initTestCase()
+{
+ QDeclarativeDataTest::initTestCase();
+ qmlRegisterType<TestPolishItem>("Qt.test", 1, 0, "TestPolishItem");
+}
+
// Focus has no effect when outside a canvas
void tst_qquickitem::noCanvas()
{
TestPolishItem *item = new TestPolishItem(canvas->rootItem());
item->setSize(QSizeF(200, 100));
QTest::qWait(50);
+
+ QTimer::singleShot(10, item, SLOT(doPolish()));
QTRY_VERIFY(item->wasPolished);
delete item;
delete canvas;
}
+void tst_qquickitem::polishOnCompleted()
+{
+ QQuickView *view = new QQuickView;
+ view->setSource(testFileUrl("polishOnCompleted.qml"));
+ view->show();
+
+ TestPolishItem *item = qobject_cast<TestPolishItem*>(view->rootObject());
+ QVERIFY(item);
+
+#ifdef Q_OS_MAC
+ QSKIP("QTBUG-21590 view does not reliably receive polish without a running animation");
+#endif
+
+ QTRY_VERIFY(item->wasPolished);
+
+ delete view;
+}
+
void tst_qquickitem::wheelEvent_data()
{
QTest::addColumn<bool>("visible");
QVERIFY(!findItem<QQuickItem>(contentItem, "wrapper", 10));
listview->setHeight(320);
+
#ifdef Q_OS_MAC
- QEXPECT_FAIL("", "QTBUG-23481", Abort);
+ QSKIP("QTBUG-21590 view does not reliably receive polish without a running animation");
#endif
+
QTRY_VERIFY(findItem<QQuickItem>(contentItem, "wrapper", 10));
listview->setHeight(100);
void tst_QQuickPathView::package()
{
-#ifdef Q_OS_MAC
- QSKIP("QTBUG-23482");
-#endif
-
QQuickView *canvas = createView();
QVERIFY(canvas);
canvas->setSource(testFileUrl("pathview_package.qml"));
QQuickPathView *pathView = canvas->rootObject()->findChild<QQuickPathView*>("photoPathView");
QVERIFY(pathView);
+#ifdef Q_OS_MAC
+ QSKIP("QTBUG-21590 view does not reliably receive polish without a running animation");
+#endif
+
QQuickItem *item = findItem<QQuickItem>(pathView, "pathItem");
QVERIFY(item);
QVERIFY(item->scale() != 1.0);