aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@qt.io>2017-05-10 19:16:54 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2017-05-10 19:16:54 +0000
commit3beb812dab5b928329bb7c68dce411fccad03546 (patch)
treeb742f2bc0aa40fef440fcbe127a63be620a9a1f0 /tests
parent127d5fd9e82e5e74872ff42cc7260ad47a5579be (diff)
parentafcbdccbe7be5446f693a84cdf1886fe92a2e033 (diff)
Merge "Merge remote-tracking branch 'origin/5.9.0' into 5.9" into refs/staging/5.9
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/qqmlengine/tst_qqmlengine.cpp1
-rw-r--r--tests/auto/quick/qquickitem2/data/nonexistentPropertyConnection.qml11
-rw-r--r--tests/auto/quick/qquickitem2/tst_qquickitem.cpp10
-rw-r--r--tests/auto/quick/touchmouse/tst_touchmouse.cpp9
4 files changed, 25 insertions, 6 deletions
diff --git a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp
index 3f6107ab2b..07569efc72 100644
--- a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp
+++ b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp
@@ -36,6 +36,7 @@
#include <QSignalSpy>
#include <QDebug>
#include <QBuffer>
+#include <QCryptographicHash>
#include <QQmlComponent>
#include <QQmlNetworkAccessManagerFactory>
#include <QQmlExpression>
diff --git a/tests/auto/quick/qquickitem2/data/nonexistentPropertyConnection.qml b/tests/auto/quick/qquickitem2/data/nonexistentPropertyConnection.qml
new file mode 100644
index 0000000000..ed0632a68a
--- /dev/null
+++ b/tests/auto/quick/qquickitem2/data/nonexistentPropertyConnection.qml
@@ -0,0 +1,11 @@
+import QtQuick 2.4
+
+Item {
+ function hint() {
+ }
+
+ Connections {
+ target: BlaBlaBla
+ onHint: hint();
+ }
+}
diff --git a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
index cc74b7e07d..09e89ff85f 100644
--- a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
+++ b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
@@ -98,6 +98,7 @@ private slots:
void mapCoordinatesRect();
void mapCoordinatesRect_data();
void propertyChanges();
+ void nonexistentPropertyConnection();
void transforms();
void transforms_data();
void childrenRect();
@@ -2612,6 +2613,15 @@ void tst_QQuickItem::propertyChanges()
delete window;
}
+void tst_QQuickItem::nonexistentPropertyConnection()
+{
+ // QTBUG-56551: don't crash
+ QQmlComponent component(&engine, testFileUrl("nonexistentPropertyConnection.qml"));
+ QObject *o = component.create();
+ QVERIFY(o);
+ delete o;
+}
+
void tst_QQuickItem::childrenRect()
{
QQuickView *window = new QQuickView(0);
diff --git a/tests/auto/quick/touchmouse/tst_touchmouse.cpp b/tests/auto/quick/touchmouse/tst_touchmouse.cpp
index b948591a0b..39f2961927 100644
--- a/tests/auto/quick/touchmouse/tst_touchmouse.cpp
+++ b/tests/auto/quick/touchmouse/tst_touchmouse.cpp
@@ -571,7 +571,7 @@ void tst_TouchMouse::buttonOnFlickable()
QQuickWindowPrivate *windowPriv = QQuickWindowPrivate::get(window.data());
QVERIFY(windowPriv->touchMouseId != -1);
- auto pointerEvent = QQuickPointerDevice::touchDevices().at(0)->pointerEvent();
+ auto pointerEvent = windowPriv->pointerEventInstance(QQuickPointerDevice::touchDevices().at(0));
QCOMPARE(pointerEvent->point(0)->grabber(), eventItem1);
QCOMPARE(window->mouseGrabberItem(), eventItem1);
@@ -632,7 +632,7 @@ void tst_TouchMouse::touchButtonOnFlickable()
QQuickWindowPrivate *windowPriv = QQuickWindowPrivate::get(window.data());
QVERIFY(windowPriv->touchMouseId == -1);
- auto pointerEvent = QQuickPointerDevice::touchDevices().at(0)->pointerEvent();
+ auto pointerEvent = windowPriv->pointerEventInstance(QQuickPointerDevice::touchDevices().at(0));
QCOMPARE(pointerEvent->point(0)->grabber(), eventItem2);
QCOMPARE(window->mouseGrabberItem(), nullptr);
@@ -758,7 +758,7 @@ void tst_TouchMouse::buttonOnDelayedPressFlickable()
// for the touchMouseId to the new grabber.
QCOMPARE(window->mouseGrabberItem(), flickable);
QVERIFY(windowPriv->touchMouseId != -1);
- auto pointerEvent = QQuickPointerDevice::touchDevices().at(0)->pointerEvent();
+ auto pointerEvent = windowPriv->pointerEventInstance(QQuickPointerDevice::touchDevices().at(0));
QCOMPARE(pointerEvent->point(0)->grabber(), flickable);
QTest::touchEvent(window.data(), device).release(0, p3, window.data());
@@ -1447,9 +1447,6 @@ void tst_TouchMouse::hoverEnabled()
QVERIFY(!mouseArea2->hovered());
// ------------------------- Touch click on mouseArea2
- if (QGuiApplication::platformName().compare(QLatin1String("xcb"), Qt::CaseInsensitive) == 0)
- QSKIP("hover can be momentarily inconsistent on X11, depending on timing of flushFrameSynchronousEvents with touch and mouse movements (QTBUG-55350)");
-
QTest::touchEvent(window.data(), device).press(0, p2, window.data());
QVERIFY(mouseArea1->hovered());