diff options
Diffstat (limited to 'tests/auto/quick')
-rw-r--r-- | tests/auto/quick/qquickmultipointtoucharea/BLACKLIST | 4 | ||||
-rw-r--r-- | tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp | 6 | ||||
-rw-r--r-- | tests/auto/quick/qquickwindow/tst_qquickwindow.cpp | 18 |
3 files changed, 15 insertions, 13 deletions
diff --git a/tests/auto/quick/qquickmultipointtoucharea/BLACKLIST b/tests/auto/quick/qquickmultipointtoucharea/BLACKLIST index cdb3e7733b..de939b5273 100644 --- a/tests/auto/quick/qquickmultipointtoucharea/BLACKLIST +++ b/tests/auto/quick/qquickmultipointtoucharea/BLACKLIST @@ -1,6 +1,10 @@ [nonOverlapping] ubuntu-16.04 ubuntu-18.04 +opensuse-42.3 +opensuse-leap [nested] ubuntu-16.04 ubuntu-18.04 +opensuse-42.3 +opensuse-leap diff --git a/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp b/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp index b34612ee88..832b973d96 100644 --- a/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp +++ b/tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp @@ -159,17 +159,15 @@ void tst_qquickrectangle::gradient_multiple() // Start off clean QQuickItemPrivate *firstRectPriv = QQuickItemPrivate::get(firstRect); QQuickItemPrivate *secondRectPriv = QQuickItemPrivate::get(secondRect); - bool firstIsDirty = firstRectPriv->dirtyAttributes & QQuickItemPrivate::Content; + QTRY_VERIFY(!(firstRectPriv->dirtyAttributes & QQuickItemPrivate::Content)); bool secondIsDirty = secondRectPriv->dirtyAttributes & QQuickItemPrivate::Content; - QVERIFY(!firstIsDirty); QVERIFY(!secondIsDirty); QMetaObject::invokeMethod(view.rootObject(), "changeGradient"); // Changing the gradient should have scheduled an update of both items - firstIsDirty = firstRectPriv->dirtyAttributes & QQuickItemPrivate::Content; + QTRY_VERIFY(firstRectPriv->dirtyAttributes & QQuickItemPrivate::Content); secondIsDirty = secondRectPriv->dirtyAttributes & QQuickItemPrivate::Content; - QVERIFY(firstIsDirty); QVERIFY(secondIsDirty); } diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp index a862604fc1..4cf7fa7119 100644 --- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp +++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp @@ -1645,11 +1645,11 @@ void tst_qquickwindow::focusReason() window->setTitle(QTest::currentTestFunction()); QVERIFY(QTest::qWaitForWindowExposed(window)); - QQuickItem *firstItem = new QQuickItem; + QScopedPointer<QQuickItem> firstItem(new QQuickItem); firstItem->setSize(QSizeF(100, 100)); firstItem->setParentItem(window->contentItem()); - QQuickItem *secondItem = new QQuickItem; + QScopedPointer<QQuickItem> secondItem(new QQuickItem); secondItem->setSize(QSizeF(100, 100)); secondItem->setParentItem(window->contentItem()); @@ -1673,7 +1673,7 @@ void tst_qquickwindow::ignoreUnhandledMouseEvents() window->show(); QVERIFY(QTest::qWaitForWindowExposed(window)); - QQuickItem *item = new QQuickItem; + QScopedPointer<QQuickItem> item(new QQuickItem); item->setSize(QSizeF(100, 100)); item->setParentItem(window->contentItem()); @@ -1883,8 +1883,8 @@ void tst_qquickwindow::hideThenDelete() QFETCH(bool, persistentSG); QFETCH(bool, persistentGL); - QSignalSpy *openglDestroyed = nullptr; - QSignalSpy *sgInvalidated = nullptr; + QScopedPointer<QSignalSpy> openglDestroyed; + QScopedPointer<QSignalSpy> sgInvalidated; { QQuickWindow window; @@ -1903,10 +1903,10 @@ void tst_qquickwindow::hideThenDelete() const bool isGL = window.rendererInterface()->graphicsApi() == QSGRendererInterface::OpenGL; #if QT_CONFIG(opengl) if (isGL) - openglDestroyed = new QSignalSpy(window.openglContext(), SIGNAL(aboutToBeDestroyed())); + openglDestroyed.reset(new QSignalSpy(window.openglContext(), SIGNAL(aboutToBeDestroyed()))); #endif - sgInvalidated = new QSignalSpy(&window, SIGNAL(sceneGraphInvalidated())); + sgInvalidated.reset(new QSignalSpy(&window, SIGNAL(sceneGraphInvalidated()))); window.hide(); @@ -1951,7 +1951,7 @@ void tst_qquickwindow::showHideAnimate() QQmlEngine engine; QQmlComponent component(&engine); component.loadUrl(testFileUrl("showHideAnimate.qml")); - QQuickItem* created = qobject_cast<QQuickItem *>(component.create()); + QScopedPointer<QQuickItem> created(qobject_cast<QQuickItem *>(component.create())); QVERIFY(created); @@ -2293,7 +2293,7 @@ void tst_qquickwindow::contentItemSize() QQmlEngine engine; QQmlComponent component(&engine); component.setData(QByteArray("import QtQuick 2.1\n Rectangle { anchors.fill: parent }"), QUrl()); - QQuickItem *rect = qobject_cast<QQuickItem *>(component.create()); + QScopedPointer<QQuickItem> rect(qobject_cast<QQuickItem *>(component.create())); QVERIFY(rect); rect->setParentItem(window.contentItem()); QCOMPARE(QSizeF(rect->width(), rect->height()), size); |