aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick')
-rw-r--r--tests/auto/quick/qquickanimations/BLACKLIST40
-rw-r--r--tests/auto/quick/qquickanimations/qquickanimations.pro1
-rw-r--r--tests/auto/quick/qquickflickable/BLACKLIST19
-rw-r--r--tests/auto/quick/qquickflickable/qquickflickable.pro1
-rw-r--r--tests/auto/quick/qquickgridview/qquickgridview.pro3
-rw-r--r--tests/auto/quick/qquickitem/data/contains.qml26
-rw-r--r--tests/auto/quick/qquickitem/tst_qquickitem.cpp45
-rw-r--r--tests/auto/quick/qquickloader/qquickloader.pro1
-rw-r--r--tests/auto/quick/qquickpathview/qquickpathview.pro2
-rw-r--r--tests/auto/quick/qquickstates/data/revertListMemoryLeak.qml16
-rw-r--r--tests/auto/quick/qquickstates/tst_qquickstates.cpp25
-rw-r--r--tests/auto/quick/qquicktext/qquicktext.pro2
-rw-r--r--tests/auto/quick/qquicktextedit/qquicktextedit.pro3
-rw-r--r--tests/auto/quick/qquickwindow/BLACKLIST2
14 files changed, 173 insertions, 13 deletions
diff --git a/tests/auto/quick/qquickanimations/BLACKLIST b/tests/auto/quick/qquickanimations/BLACKLIST
new file mode 100644
index 0000000000..e45c141d17
--- /dev/null
+++ b/tests/auto/quick/qquickanimations/BLACKLIST
@@ -0,0 +1,40 @@
+# QTBUG-45466 QTBUG-29062
+[simpleProperty]
+osx-10.9 developer-build
+[badTypes]
+windows msvc-2010 32bit developer-build
+[mixedTypes]
+windows msvc-2010 32bit developer-build
+[properties]
+windows msvc-2010 32bit developer-build
+[propertiesTransition]
+windows msvc-2010 32bit developer-build
+[pathTransition]
+windows msvc-2010 32bit developer-build
+[disabledTransition]
+windows msvc-2010 32bit developer-build
+[rotation]
+windows msvc-2010 32bit developer-build
+[startStopSignals]
+windows msvc-2010 32bit developer-build
+[runningTrueBug]
+windows msvc-2010 32bit developer-build
+[nonTransitionBug]
+windows msvc-2010 32bit developer-build
+[registrationBug]
+windows msvc-2010 32bit developer-build
+[alwaysRunToEndRestartBug]
+windows msvc-2010 32bit developer-build
+[loopingBug]
+windows msvc-2010 32bit developer-build
+[pathAnimationInOutBackBug]
+windows msvc-2010 32bit developer-build
+[reparent]
+windows msvc-2012 64bit developer-build
+windows msvc-2010 32bit developer-build
+[simpleAnchor]
+windows msvc-2010 32bit developer-build
+[simplePath]
+windows gcc developer-build
+windows msvc-2010 32bit developer-build
+
diff --git a/tests/auto/quick/qquickanimations/qquickanimations.pro b/tests/auto/quick/qquickanimations/qquickanimations.pro
index f3e1cd082f..dc8f471259 100644
--- a/tests/auto/quick/qquickanimations/qquickanimations.pro
+++ b/tests/auto/quick/qquickanimations/qquickanimations.pro
@@ -1,5 +1,4 @@
CONFIG += testcase
-win32-g++|mac:CONFIG+=insignificant_test # QTBUG-29062
TARGET = tst_qquickanimations
SOURCES += tst_qquickanimations.cpp
diff --git a/tests/auto/quick/qquickflickable/BLACKLIST b/tests/auto/quick/qquickflickable/BLACKLIST
new file mode 100644
index 0000000000..92ed8708de
--- /dev/null
+++ b/tests/auto/quick/qquickflickable/BLACKLIST
@@ -0,0 +1,19 @@
+# QTBUG-36804
+osx-10.10
+[rebound]
+osx-10.10
+[movingAndFlicking:vertical]
+osx-10.10
+[movingAndFlicking:both]
+osx-10.10
+[movingAndFlicking:horizontal]
+osx-10.10
+[stopAtBounds]
+osx-10.10
+windows 32bit developer-build
+[returnToBounds]
+osx
+[pressWhileFlicking]
+osx-10.10
+[flickVelocity]
+osx-10.10
diff --git a/tests/auto/quick/qquickflickable/qquickflickable.pro b/tests/auto/quick/qquickflickable/qquickflickable.pro
index 81b2b1a00c..88dc2fbc2a 100644
--- a/tests/auto/quick/qquickflickable/qquickflickable.pro
+++ b/tests/auto/quick/qquickflickable/qquickflickable.pro
@@ -11,4 +11,3 @@ TESTDATA = data/*
QT += core-private gui-private qml-private quick-private testlib
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
-macx:CONFIG+=insignificant_test
diff --git a/tests/auto/quick/qquickgridview/qquickgridview.pro b/tests/auto/quick/qquickgridview/qquickgridview.pro
index 40b43fa2c0..3b98ed4dea 100644
--- a/tests/auto/quick/qquickgridview/qquickgridview.pro
+++ b/tests/auto/quick/qquickgridview/qquickgridview.pro
@@ -12,7 +12,4 @@ TESTDATA = data/*
QT += core-private gui-private qml-private quick-private testlib
-win32:CONFIG += insignificant_test # QTBUG-33017
-macx:CONFIG += insignificant_test # QTBUG-33017
-
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
diff --git a/tests/auto/quick/qquickitem/data/contains.qml b/tests/auto/quick/qquickitem/data/contains.qml
new file mode 100644
index 0000000000..72fd8bdc91
--- /dev/null
+++ b/tests/auto/quick/qquickitem/data/contains.qml
@@ -0,0 +1,26 @@
+import QtQuick 2.3
+
+Item {
+ id: root
+ width: 300
+ height: 300
+
+ function childContainsViaMapToItem(x, y) {
+ var childLocalPos = root.mapToItem(child, x, y);
+ return child.contains(childLocalPos);
+ }
+
+ function childContainsViaMapFromItem(x, y) {
+ var childLocalPos = child.mapFromItem(root, x, y);
+ return child.contains(childLocalPos);
+ }
+
+ Item {
+ id: child
+ x: 50
+ y: 50
+ width: 50
+ height: 50
+ }
+}
+
diff --git a/tests/auto/quick/qquickitem/tst_qquickitem.cpp b/tests/auto/quick/qquickitem/tst_qquickitem.cpp
index 832cbab971..c79af91747 100644
--- a/tests/auto/quick/qquickitem/tst_qquickitem.cpp
+++ b/tests/auto/quick/qquickitem/tst_qquickitem.cpp
@@ -169,6 +169,9 @@ private slots:
void objectChildTransform();
+ void contains_data();
+ void contains();
+
private:
enum PaintOrderOp {
@@ -1927,6 +1930,48 @@ void tst_qquickitem::objectChildTransform()
// Shouldn't crash.
}
+void tst_qquickitem::contains_data()
+{
+ QTest::addColumn<int>("x");
+ QTest::addColumn<int>("y");
+ QTest::addColumn<bool>("contains");
+
+ QTest::newRow("(0, 0) = false") << 0 << 0 << false;
+ QTest::newRow("(50, 0) = false") << 50 << 0 << false;
+ QTest::newRow("(0, 50) = false") << 0 << 50 << false;
+ QTest::newRow("(50, 50) = true") << 50 << 50 << true;
+ QTest::newRow("(100, 100) = true") << 100 << 100 << true;
+ QTest::newRow("(150, 150) = false") << 150 << 150 << false;
+}
+
+void tst_qquickitem::contains()
+{
+ // Tests that contains works, but also checks that mapToItem/mapFromItem
+ // return the correct type (point or rect, not a JS object with those properties),
+ // as this is a common combination of calls.
+
+ QFETCH(int, x);
+ QFETCH(int, y);
+ QFETCH(bool, contains);
+
+ QQuickView view;
+ view.setSource(testFileUrl("contains.qml"));
+
+ QQuickItem *root = qobject_cast<QQuickItem*>(view.rootObject());
+ QVERIFY(root);
+
+ QVariant result = false;
+ QVERIFY(QMetaObject::invokeMethod(root, "childContainsViaMapToItem",
+ Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, qreal(x)), Q_ARG(QVariant, qreal(y))));
+ QCOMPARE(result.toBool(), contains);
+
+ result = false;
+ QVERIFY(QMetaObject::invokeMethod(root, "childContainsViaMapFromItem",
+ Q_RETURN_ARG(QVariant, result), Q_ARG(QVariant, qreal(x)), Q_ARG(QVariant, qreal(y))));
+ QCOMPARE(result.toBool(), contains);
+}
+
+
QTEST_MAIN(tst_qquickitem)
#include "tst_qquickitem.moc"
diff --git a/tests/auto/quick/qquickloader/qquickloader.pro b/tests/auto/quick/qquickloader/qquickloader.pro
index 88de3c4c60..567917877c 100644
--- a/tests/auto/quick/qquickloader/qquickloader.pro
+++ b/tests/auto/quick/qquickloader/qquickloader.pro
@@ -14,4 +14,3 @@ TESTDATA = data/*
QT += core-private gui-private qml-private quick-private network testlib
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
-CONFIG+=insignificant_test # QTBUG-30721
diff --git a/tests/auto/quick/qquickpathview/qquickpathview.pro b/tests/auto/quick/qquickpathview/qquickpathview.pro
index 8d729fd7c4..e6cf9a488f 100644
--- a/tests/auto/quick/qquickpathview/qquickpathview.pro
+++ b/tests/auto/quick/qquickpathview/qquickpathview.pro
@@ -12,5 +12,3 @@ TESTDATA = data/*
QT += core-private gui-private qml-private quick-private testlib
qtHaveModule(widgets): QT += widgets
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
-
-macx:CONFIG += insignificant_test # QTBUG-27740
diff --git a/tests/auto/quick/qquickstates/data/revertListMemoryLeak.qml b/tests/auto/quick/qquickstates/data/revertListMemoryLeak.qml
new file mode 100644
index 0000000000..b49487c895
--- /dev/null
+++ b/tests/auto/quick/qquickstates/data/revertListMemoryLeak.qml
@@ -0,0 +1,16 @@
+import QtQuick 2.0
+
+Item {
+ id: rect
+ width: 40;
+ property real boundHeight: 42
+ height: boundHeight;
+
+ states: [
+ State {
+ objectName: "testState"
+ name: "testState"
+ PropertyChanges { target: rect; height: 60; }
+ }
+ ]
+}
diff --git a/tests/auto/quick/qquickstates/tst_qquickstates.cpp b/tests/auto/quick/qquickstates/tst_qquickstates.cpp
index 51fe9b4c96..6c42a7a0ee 100644
--- a/tests/auto/quick/qquickstates/tst_qquickstates.cpp
+++ b/tests/auto/quick/qquickstates/tst_qquickstates.cpp
@@ -141,6 +141,7 @@ private slots:
void avoidFastForward();
void revertListBug();
void QTBUG_38492();
+ void revertListMemoryLeak();
};
void tst_qquickstates::initTestCase()
@@ -1634,6 +1635,30 @@ void tst_qquickstates::QTBUG_38492()
delete item;
}
+void tst_qquickstates::revertListMemoryLeak()
+{
+ QWeakPointer<QQmlAbstractBinding> weakPtr;
+ {
+ QQmlEngine engine;
+
+ QQmlComponent c(&engine, testFileUrl("revertListMemoryLeak.qml"));
+ QQuickItem *item = qobject_cast<QQuickItem *>(c.create());
+ QVERIFY(item);
+ QQuickState *state = item->findChild<QQuickState*>("testState");
+ QVERIFY(state);
+
+ item->setState("testState");
+
+ QQmlAbstractBinding *binding = state->bindingInRevertList(item, "height");
+ QVERIFY(binding);
+ weakPtr = QQmlAbstractBinding::getPointer(binding);
+ QVERIFY(!weakPtr.toStrongRef().isNull());
+
+ delete item;
+ }
+ QVERIFY(weakPtr.toStrongRef().isNull());
+}
+
QTEST_MAIN(tst_qquickstates)
#include "tst_qquickstates.moc"
diff --git a/tests/auto/quick/qquicktext/qquicktext.pro b/tests/auto/quick/qquicktext/qquicktext.pro
index c25a27b745..ee0a9be776 100644
--- a/tests/auto/quick/qquicktext/qquicktext.pro
+++ b/tests/auto/quick/qquicktext/qquicktext.pro
@@ -14,5 +14,3 @@ TESTDATA = data/*
QT += core-private gui-private qml-private quick-private network testlib
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
-
-mac:CONFIG += insignificant_test # QTBUG-27740
diff --git a/tests/auto/quick/qquicktextedit/qquicktextedit.pro b/tests/auto/quick/qquicktextedit/qquicktextedit.pro
index 2386d713a7..2a6d753536 100644
--- a/tests/auto/quick/qquicktextedit/qquicktextedit.pro
+++ b/tests/auto/quick/qquicktextedit/qquicktextedit.pro
@@ -14,6 +14,3 @@ TESTDATA = data/*
QT += core-private gui-private qml-private quick-private network-private testlib
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
-
-mac:CONFIG += insignificant_test # QTBUG-27740
-win32:CONFIG += insignificant_test # QTBUG-32540
diff --git a/tests/auto/quick/qquickwindow/BLACKLIST b/tests/auto/quick/qquickwindow/BLACKLIST
index 331f736013..8a19a679a3 100644
--- a/tests/auto/quick/qquickwindow/BLACKLIST
+++ b/tests/auto/quick/qquickwindow/BLACKLIST
@@ -1,2 +1,4 @@
[cursor]
*
+[testWindowVisibilityOrder]
+osx