aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-08-19 16:32:03 +0200
committerLiang Qi <liang.qi@qt.io>2016-08-19 16:32:09 +0200
commit4f0988c3907406087dbfdc193abfbf767678d814 (patch)
treeaafd9c98bb248d9920443778bf122ea23b1e4c75
parent32a980a86257021247a742b2b8c0b4aafe6e9035 (diff)
parent01a9c006b0cb3f9ec7c140d25e6bfa3ca6250a4c (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
-rw-r--r--src/imports/testlib/TestCase.qml9
-rw-r--r--src/qml/doc/src/cppintegration/exposecppattributes.qdoc2
-rw-r--r--src/qml/qml/qqmljavascriptexpression.cpp2
-rw-r--r--src/qmltest/quicktestevent.cpp13
-rw-r--r--src/qmltest/quicktestevent_p.h2
-rw-r--r--src/quick/items/qquickgridview.cpp4
-rw-r--r--src/quick/items/qquicklistview.cpp4
7 files changed, 22 insertions, 14 deletions
diff --git a/src/imports/testlib/TestCase.qml b/src/imports/testlib/TestCase.qml
index 046ce507d4..ca3e3b0a30 100644
--- a/src/imports/testlib/TestCase.qml
+++ b/src/imports/testlib/TestCase.qml
@@ -1053,6 +1053,7 @@ Item {
modifiers = Qt.NoModifier
if (delay == undefined)
delay = -1
+ var moveDelay = Math.max(1, delay === -1 ? qtest_events.defaultMouseDelay : delay)
// Divide dx and dy to have intermediate mouseMove while dragging
// Fractions of dx/dy need be superior to the dragThreshold
@@ -1066,12 +1067,12 @@ Item {
mousePress(item, x, y, button, modifiers, delay)
//trigger dragging
- mouseMove(item, x + util.dragThreshold + 1, y + util.dragThreshold + 1, delay, button)
+ mouseMove(item, x + util.dragThreshold + 1, y + util.dragThreshold + 1, moveDelay, button)
if (ddx > 0 || ddy > 0) {
- mouseMove(item, x + ddx, y + ddy, delay, button)
- mouseMove(item, x + 2*ddx, y + 2*ddy, delay, button)
+ mouseMove(item, x + ddx, y + ddy, moveDelay, button)
+ mouseMove(item, x + 2*ddx, y + 2*ddy, moveDelay, button)
}
- mouseMove(item, x + dx, y + dy, delay, button)
+ mouseMove(item, x + dx, y + dy, moveDelay, button)
mouseRelease(item, x + dx, y + dy, button, modifiers, delay)
}
diff --git a/src/qml/doc/src/cppintegration/exposecppattributes.qdoc b/src/qml/doc/src/cppintegration/exposecppattributes.qdoc
index c7e4930bfb..f5aea0b01a 100644
--- a/src/qml/doc/src/cppintegration/exposecppattributes.qdoc
+++ b/src/qml/doc/src/cppintegration/exposecppattributes.qdoc
@@ -73,7 +73,7 @@ convert them as appropriately when used from QML. Additionally, C++ classes
that are \l{Registering C++ types with the QML type system}{registered} with
the QML type system can be can be used as data types, as can their enums if
appropriately registered. See \l{qtqml-cppintegration-data.html}{Data Type
-Conversion Between QML and C++} for details for further information.
+Conversion Between QML and C++} for further information.
Additionally, data ownership rules are taken into consideration when data is
transferred from C++ to QML. See \l {Data Ownership} for more details.
diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp
index 8ba4b5eba1..cf0b823612 100644
--- a/src/qml/qml/qqmljavascriptexpression.cpp
+++ b/src/qml/qml/qqmljavascriptexpression.cpp
@@ -303,7 +303,7 @@ void QQmlPropertyCapture::registerQmlDependencies(QV4::ExecutionEngine *engine,
if (!ep)
return;
QQmlPropertyCapture *capture = ep->propertyCapture;
- if (!capture)
+ if (!capture || capture->watcher->wasDeleted())
return;
QV4::Scope scope(engine);
diff --git a/src/qmltest/quicktestevent.cpp b/src/qmltest/quicktestevent.cpp
index b83aaa1ea5..f722fab6c4 100644
--- a/src/qmltest/quicktestevent.cpp
+++ b/src/qmltest/quicktestevent.cpp
@@ -45,6 +45,10 @@
QT_BEGIN_NAMESPACE
+namespace QTest {
+ extern int Q_TESTLIB_EXPORT defaultMouseDelay();
+}
+
QuickTestEvent::QuickTestEvent(QObject *parent)
: QObject(parent)
{
@@ -54,6 +58,11 @@ QuickTestEvent::~QuickTestEvent()
{
}
+int QuickTestEvent::defaultMouseDelay() const
+{
+ return QTest::defaultMouseDelay();
+}
+
bool QuickTestEvent::keyPress(int key, int modifiers, int delay)
{
QWindow *window = activeWindow();
@@ -111,10 +120,6 @@ bool QuickTestEvent::keyClickChar(const QString &character, int modifiers, int d
return true;
}
-namespace QTest {
- extern int Q_TESTLIB_EXPORT defaultMouseDelay();
-};
-
namespace QtQuickTest
{
enum MouseAction { MousePress, MouseRelease, MouseClick, MouseDoubleClick, MouseMove, MouseDoubleClickSequence };
diff --git a/src/qmltest/quicktestevent_p.h b/src/qmltest/quicktestevent_p.h
index 02b8b2c46b..1adf8f3317 100644
--- a/src/qmltest/quicktestevent_p.h
+++ b/src/qmltest/quicktestevent_p.h
@@ -59,9 +59,11 @@ QT_BEGIN_NAMESPACE
class Q_QUICK_TEST_EXPORT QuickTestEvent : public QObject
{
Q_OBJECT
+ Q_PROPERTY(int defaultMouseDelay READ defaultMouseDelay FINAL)
public:
QuickTestEvent(QObject *parent = 0);
~QuickTestEvent();
+ int defaultMouseDelay() const;
public Q_SLOTS:
bool keyPress(int key, int modifiers, int delay);
diff --git a/src/quick/items/qquickgridview.cpp b/src/quick/items/qquickgridview.cpp
index cb2611199e..fe33019d27 100644
--- a/src/quick/items/qquickgridview.cpp
+++ b/src/quick/items/qquickgridview.cpp
@@ -2612,7 +2612,7 @@ bool QQuickGridViewPrivate::needsRefillForAddedOrRemovedIndex(int modelIndex) co
*/
/*!
- \qmlmethod int QtQuick::GridView::indexAt(int x, int y)
+ \qmlmethod int QtQuick::GridView::indexAt(real x, real y)
Returns the index of the visible item containing the point \a x, \a y in content
coordinates. If there is no item at the point specified, or the item is
@@ -2625,7 +2625,7 @@ bool QQuickGridViewPrivate::needsRefillForAddedOrRemovedIndex(int modelIndex) co
*/
/*!
- \qmlmethod Item QtQuick::GridView::itemAt(int x, int y)
+ \qmlmethod Item QtQuick::GridView::itemAt(real x, real y)
Returns the visible item containing the point \a x, \a y in content
coordinates. If there is no item at the point specified, or the item is
diff --git a/src/quick/items/qquicklistview.cpp b/src/quick/items/qquicklistview.cpp
index 4b9b7df98a..a98a5c8f56 100644
--- a/src/quick/items/qquicklistview.cpp
+++ b/src/quick/items/qquicklistview.cpp
@@ -3348,7 +3348,7 @@ void QQuickListViewPrivate::translateAndTransitionItemsAfter(int afterModelIndex
*/
/*!
- \qmlmethod int QtQuick::ListView::indexAt(int x, int y)
+ \qmlmethod int QtQuick::ListView::indexAt(real x, real y)
Returns the index of the visible item containing the point \a x, \a y in content
coordinates. If there is no item at the point specified, or the item is
@@ -3361,7 +3361,7 @@ void QQuickListViewPrivate::translateAndTransitionItemsAfter(int afterModelIndex
*/
/*!
- \qmlmethod Item QtQuick::ListView::itemAt(int x, int y)
+ \qmlmethod Item QtQuick::ListView::itemAt(real x, real y)
Returns the visible item containing the point \a x, \a y in content
coordinates. If there is no item at the point specified, or the item is