aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-01-14 18:06:27 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-14 20:04:43 +0100
commit679ea13790f217df0bb240fb80fd4ee5208e2084 (patch)
tree06008436e14fea1c0ac367af6f0bdd79ded967be /src/quick
parent8e17ab6dc6c51339e824f2f1a2cbdf445b482887 (diff)
parentcc0eb9c2aa9032c6a7bf2ab05d1eb913a09fa4f1 (diff)
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/doc/qtquick.qdocconf3
-rw-r--r--src/quick/doc/src/qmltypereference.qdoc15
-rw-r--r--src/quick/doc/src/qtquick.qdoc1
-rw-r--r--src/quick/items/qquickflickable.cpp6
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp11
5 files changed, 25 insertions, 11 deletions
diff --git a/src/quick/doc/qtquick.qdocconf b/src/quick/doc/qtquick.qdocconf
index 846da64ea4..5ba7d66b04 100644
--- a/src/quick/doc/qtquick.qdocconf
+++ b/src/quick/doc/qtquick.qdocconf
@@ -38,7 +38,8 @@ depends += qtcore qtxmlpatterns qtqml qtgui qtlinguist qtquickcontrols qtquickla
headerdirs += ..
-sourcedirs += ..
+sourcedirs += .. \
+ ../../imports/testlib
exampledirs += ../../../examples/quick \
snippets
diff --git a/src/quick/doc/src/qmltypereference.qdoc b/src/quick/doc/src/qmltypereference.qdoc
index dda06d31e1..7fc9bea032 100644
--- a/src/quick/doc/src/qmltypereference.qdoc
+++ b/src/quick/doc/src/qmltypereference.qdoc
@@ -42,11 +42,11 @@ by this module, organized according to category and purpose.
The types provided by the \l {Qt Quick} module are only available in a QML document
if that document imports the \c QtQuick namespace.
-The current version of the \c QtQuick module is version 2.0, and thus it may be
+The current version of the \c QtQuick module is version 2.2, and thus it may be
imported via the following statement:
\qml
-import QtQuick 2.0
+import QtQuick 2.2
\endqml
See the \l {Qt Quick} module documentation for more
@@ -310,6 +310,14 @@ set of Particle System types for Qt Quick 2
\li \l {TextMetrics} - Provides text and font measurement data for use in a Canvas
\endlist
+\target qttest-types
+\section2 QtTest Types
+
+\list
+\li \l {QtTest::TestCase}{TestCase} - Represents a unit test case
+\li \l {QtTest::SignalSpy}{SignalSpy} - Enables introspection of signal emission
+\endlist
+
*/
/*!
@@ -1070,8 +1078,9 @@ console.log(c + " " + d); // false true
/*!
\qmlmodule QtTest 1.0
-\title Qt Quick Test
+\title Qt Quick Test QML Types
\brief This module provides QML types to unit test your QML application
+\ingroup qmlmodules
You can import this module using the following statement:
\code
diff --git a/src/quick/doc/src/qtquick.qdoc b/src/quick/doc/src/qtquick.qdoc
index 392ae0af92..4ecefe73dd 100644
--- a/src/quick/doc/src/qtquick.qdoc
+++ b/src/quick/doc/src/qtquick.qdoc
@@ -125,6 +125,7 @@ Additional Qt Quick information:
top-level windows and accessing screen information
\li \l{Qt Quick Dialogs}{Dialogs} - contains types for creating and
interacting with system dialogs
+ \li \l{Qt Quick Test QML Types}{Tests} - contains types for writing unit test for a QML application
\endlist
\li \l{Qt Quick Release Notes} - list of changes and additions in the Qt Quick
\li \l{Qt Quick Code Samples} - list of all Qt Quick examples
diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp
index 3b592004c9..7cc37e0556 100644
--- a/src/quick/items/qquickflickable.cpp
+++ b/src/quick/items/qquickflickable.cpp
@@ -1234,7 +1234,11 @@ void QQuickFlickable::mouseReleaseEvent(QMouseEvent *event)
d->replayDelayedPress();
// Now send the release
- window()->sendEvent(window()->mouseGrabberItem(), event);
+ if (window()->mouseGrabberItem()) {
+ QPointF localPos = window()->mouseGrabberItem()->mapFromScene(event->windowPos());
+ QScopedPointer<QMouseEvent> mouseEvent(QQuickWindowPrivate::cloneMouseEvent(event, &localPos));
+ window()->sendEvent(window()->mouseGrabberItem(), mouseEvent.data());
+ }
// And the event has been consumed
d->stealMouse = false;
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
index 5a2096169b..4e62f85d30 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
@@ -106,7 +106,8 @@ bool qsg_sort_batch_is_valid(Batch *a, Batch *b) { return a->first && !b->first;
bool qsg_sort_batch_increasing_order(Batch *a, Batch *b) { return a->first->order < b->first->order; }
bool qsg_sort_batch_decreasing_order(Batch *a, Batch *b) { return a->first->order > b->first->order; }
-QSGMaterial::Flag QSGMaterial_RequiresFullMatrixBit = (QSGMaterial::Flag) (QSGMaterial::RequiresFullMatrix & ~QSGMaterial::RequiresFullMatrixExceptTranslate);
+QSGMaterial::Flag QSGMaterial_FullMatrix = (QSGMaterial::Flag) (QSGMaterial::RequiresFullMatrix & ~QSGMaterial::RequiresFullMatrixExceptTranslate);
+QSGMaterial::Flag QSGMaterial_FullExceptTranslate = (QSGMaterial::Flag) (QSGMaterial::RequiresFullMatrixExceptTranslate & ~QSGMaterial::RequiresDeterminant);
struct QMatrix4x4_Accessor
{
@@ -1699,14 +1700,12 @@ void Renderer::uploadBatch(Batch *b)
QSGGeometryNode *gn = b->first->node;
QSGGeometry *g = gn->geometry();
-
+ QSGMaterial::Flags flags = gn->activeMaterial()->flags();
bool canMerge = (g->drawingMode() == GL_TRIANGLES || g->drawingMode() == GL_TRIANGLE_STRIP)
&& b->positionAttribute >= 0
&& g->indexType() == GL_UNSIGNED_SHORT
- && (gn->activeMaterial()->flags() & QSGMaterial::CustomCompileStep) == 0
- && (((gn->activeMaterial()->flags() & QSGMaterial::RequiresDeterminant) == 0)
- || (((gn->activeMaterial()->flags() & QSGMaterial_RequiresFullMatrixBit) == 0) && b->isTranslateOnlyToRoot())
- )
+ && (flags & (QSGMaterial::CustomCompileStep | QSGMaterial_FullMatrix)) == 0
+ && ((flags & QSGMaterial_FullExceptTranslate) == 0 || b->isTranslateOnlyToRoot())
&& b->isSafeToBatch();
b->merged = canMerge;