aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-01-26 10:36:32 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-01-26 10:36:32 +0100
commit0906ae8ae7df09ec775ef2f038e4924a5de95a33 (patch)
treef4b2821ee37d669445ad8184a423bd439136e977 /tests
parent9a5568a1972b72b32ae3058903cc7f4d7123b96b (diff)
parent0825d24cf5c35a7c6fe37088f23b793e33c69063 (diff)
Merge remote-tracking branch 'origin/stable' into dev
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/auto.pro3
-rw-r--r--tests/auto/qml/debugger/debugger.pro2
-rw-r--r--tests/auto/quick/qquickanimations/qquickanimations.pro2
-rw-r--r--tests/auto/quick/qquickflickable/data/pressDelayWithLoader.qml18
-rw-r--r--tests/auto/quick/qquickflickable/tst_qquickflickable.cpp22
-rw-r--r--tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp8
6 files changed, 52 insertions, 3 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 30bc175346..715f3e01ad 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -1,7 +1,10 @@
TEMPLATE=subdirs
SUBDIRS=\
qml \
+ quick \
headersclean \
+ particles \
+ qmltest \
qmldevtools \
cmake \
installed_cmake
diff --git a/tests/auto/qml/debugger/debugger.pro b/tests/auto/qml/debugger/debugger.pro
index 6838d01352..8013f46c9b 100644
--- a/tests/auto/qml/debugger/debugger.pro
+++ b/tests/auto/qml/debugger/debugger.pro
@@ -3,6 +3,8 @@ TEMPLATE = subdirs
PUBLICTESTS += \
qqmlenginedebugservice \
qqmldebugjs \
+ qqmlinspector \
+ qqmlprofilerservice \
qpacketprotocol \
# qv4profilerservice \
# qdebugmessageservice \
diff --git a/tests/auto/quick/qquickanimations/qquickanimations.pro b/tests/auto/quick/qquickanimations/qquickanimations.pro
index 1e294b9ae0..f3e1cd082f 100644
--- a/tests/auto/quick/qquickanimations/qquickanimations.pro
+++ b/tests/auto/quick/qquickanimations/qquickanimations.pro
@@ -1,5 +1,5 @@
CONFIG += testcase
-mac:CONFIG+=insignificant_test # QTBUG-29062
+win32-g++|mac:CONFIG+=insignificant_test # QTBUG-29062
TARGET = tst_qquickanimations
SOURCES += tst_qquickanimations.cpp
diff --git a/tests/auto/quick/qquickflickable/data/pressDelayWithLoader.qml b/tests/auto/quick/qquickflickable/data/pressDelayWithLoader.qml
new file mode 100644
index 0000000000..7ef4e70c95
--- /dev/null
+++ b/tests/auto/quick/qquickflickable/data/pressDelayWithLoader.qml
@@ -0,0 +1,18 @@
+import QtQuick 2.0
+
+Loader {
+ id: loader
+
+ width: 300
+ height: 300
+
+ sourceComponent: Flickable {
+ pressDelay: 1000
+ contentWidth: loader.width
+ contentHeight: loader.height
+ MouseArea {
+ anchors.fill: parent
+ onPressed: loader.sourceComponent = null
+ }
+ }
+}
diff --git a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
index 59b54e7ba5..8ab86bf2d3 100644
--- a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
+++ b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
@@ -97,6 +97,7 @@ private slots:
void stopAtBounds();
void stopAtBounds_data();
void nestedMouseAreaUsingTouch();
+ void pressDelayWithLoader();
private:
void flickWithTouch(QWindow *window, QTouchDevice *touchDevice, const QPoint &from, const QPoint &to);
@@ -1532,9 +1533,9 @@ void tst_qquickflickable::stopAtBounds()
flickable->setContentX(invert ? 100 : 0);
}
if (invert)
- flick(&view, QPoint(20,20), QPoint(100,100), 100);
+ flick(&view, QPoint(20,20), QPoint(120,120), 100);
else
- flick(&view, QPoint(100,100), QPoint(20,20), 100);
+ flick(&view, QPoint(120,120), QPoint(20,20), 100);
QVERIFY(flickable->isFlicking());
if (transpose) {
@@ -1580,6 +1581,23 @@ void tst_qquickflickable::nestedMouseAreaUsingTouch()
QVERIFY(nested->y() < 100.0);
}
+// QTBUG-31328
+void tst_qquickflickable::pressDelayWithLoader()
+{
+ QScopedPointer<QQuickView> window(new QQuickView);
+ window->setSource(testFileUrl("pressDelayWithLoader.qml"));
+ QTRY_COMPARE(window->status(), QQuickView::Ready);
+ QQuickViewTestUtil::centerOnScreen(window.data());
+ QQuickViewTestUtil::moveMouseAway(window.data());
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window.data()));
+ QVERIFY(window->rootObject() != 0);
+
+ // do not crash
+ QTest::mousePress(window.data(), Qt::LeftButton, 0, QPoint(150, 150));
+ QTest::mouseRelease(window.data(), Qt::LeftButton, 0, QPoint(150, 150));
+}
+
QTEST_MAIN(tst_qquickflickable)
#include "tst_qquickflickable.moc"
diff --git a/tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp b/tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp
index 69008486c4..e63ff6639e 100644
--- a/tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp
+++ b/tests/auto/quick/qquickpositioners/tst_qquickpositioners.cpp
@@ -1968,6 +1968,14 @@ void tst_qquickpositioners::test_mirroring()
QQuickItem *itemA = rootA->findChild<QQuickItem*>(objectName);
QQuickItem *itemB = rootB->findChild<QQuickItem*>(objectName);
QTRY_COMPARE(itemA->x(), itemB->x());
+
+ // after resize (QTBUG-35095)
+ QQuickItem *positionerA = itemA->parentItem();
+ QQuickItem *positionerB = itemB->parentItem();
+ positionerA->setWidth(positionerA->width() * 2);
+ positionerB->setWidth(positionerB->width() * 2);
+ QTRY_VERIFY(!QQuickItemPrivate::get(positionerA)->polishScheduled && !QQuickItemPrivate::get(positionerB)->polishScheduled);
+ QTRY_COMPARE(itemA->x(), itemB->x());
}
rootA->setProperty("testRightToLeft", false); // layoutDirection: Qt.LeftToRight