aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-03-26 01:00:06 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-03-26 01:00:06 +0100
commitfbd86c6a24ee4999d724f9aaccf1941d02538187 (patch)
treece734921c9804eff76498b77e24742c71b1aafff /tests/auto/quick
parenta8cc4f2b51722380a30fae0009205db917feb7a9 (diff)
parent0dab320fb42ba2ac855baf05972c3420c11d002e (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Diffstat (limited to 'tests/auto/quick')
-rw-r--r--tests/auto/quick/qquickmultipointtoucharea/BLACKLIST4
-rw-r--r--tests/auto/quick/qquickrectangle/tst_qquickrectangle.cpp6
-rw-r--r--tests/auto/quick/qquickwindow/tst_qquickwindow.cpp18
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);