aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-06-24 22:37:33 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-06-24 22:37:33 +0200
commited86fb2dbd4d4887e4c7b2d37f7842ac64a5e860 (patch)
tree0703b80939874a7bb9e7a4028a07d998d866010d
parent2d065ddb53a31c1b717c88902bcdf4f6b24f320f (diff)
parent7320f61e8782119a3f95d85f67fb9c7a973d043a (diff)
Merge remote-tracking branch 'origin/stable' into dev
-rw-r--r--examples/quick/demos/photosurface/photosurface.qml5
-rw-r--r--examples/quick/dialogs/dialogs.pro19
-rw-r--r--examples/quick/dialogs/systemdialogs/ColorDialogs.qml (renamed from examples/quick/dialogs/ColorDialogs.qml)0
-rw-r--r--examples/quick/dialogs/systemdialogs/FileDialogs.qml (renamed from examples/quick/dialogs/FileDialogs.qml)0
-rw-r--r--examples/quick/dialogs/systemdialogs/doc/images/systemdialogs-example.jpg (renamed from examples/quick/dialogs/doc/images/dialogs-example.jpg)bin47413 -> 47413 bytes
-rw-r--r--examples/quick/dialogs/systemdialogs/doc/src/systemdialogs.qdoc (renamed from examples/quick/dialogs/doc/src/dialogs.qdoc)16
-rw-r--r--examples/quick/dialogs/systemdialogs/main.cpp (renamed from examples/quick/dialogs/main.cpp)4
-rw-r--r--examples/quick/dialogs/systemdialogs/systemdialogs.pro17
-rw-r--r--examples/quick/dialogs/systemdialogs/systemdialogs.qml (renamed from examples/quick/dialogs/dialogs.qml)0
-rw-r--r--examples/quick/dialogs/systemdialogs/systemdialogs.qrc (renamed from examples/quick/dialogs/dialogs.qrc)2
-rw-r--r--examples/quick/particles/imageparticle/doc/src/imageparticle.qdoc2
-rw-r--r--examples/quick/particles/system/doc/src/system.qdoc2
-rw-r--r--src/imports/widgets/qquickqcolordialog.cpp7
-rw-r--r--src/imports/widgets/qquickqfiledialog.cpp7
-rw-r--r--src/quick/doc/images/qml-item-canvas.arc.png (renamed from src/quick/doc/images/qml-item-canvas-arcTo2.png)bin6532 -> 6532 bytes
-rw-r--r--src/quick/items/context2d/qquickcontext2d.cpp85
-rw-r--r--src/quick/items/qquickanimatedsprite.cpp7
-rw-r--r--src/quick/scenegraph/coreapi/qsgmaterial.cpp1
-rw-r--r--src/quick/scenegraph/coreapi/qsgmaterial.h1
-rw-r--r--src/quick/scenegraph/qsgcontext.cpp9
-rw-r--r--tests/auto/quick/examples/tst_examples.cpp1
-rw-r--r--tests/auto/quick/qquickanimatedsprite/data/runningChange.qml59
-rw-r--r--tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp24
-rw-r--r--tests/auto/quick/touchmouse/touchmouse.pro2
24 files changed, 190 insertions, 80 deletions
diff --git a/examples/quick/demos/photosurface/photosurface.qml b/examples/quick/demos/photosurface/photosurface.qml
index 53e0edffbe..4f7100358f 100644
--- a/examples/quick/demos/photosurface/photosurface.qml
+++ b/examples/quick/demos/photosurface/photosurface.qml
@@ -39,13 +39,14 @@
****************************************************************************/
import QtQuick 2.0
import QtQuick.Dialogs 1.0
+import QtQuick.Window 2.1
import Qt.labs.folderlistmodel 1.0
-Rectangle {
+Window {
id: root
+ visible: true
width: 1024; height: 600
color: "black"
- visible: true
property int highestZ: 0
property real defaultSize: 200
diff --git a/examples/quick/dialogs/dialogs.pro b/examples/quick/dialogs/dialogs.pro
index b76f396e9d..538e75686c 100644
--- a/examples/quick/dialogs/dialogs.pro
+++ b/examples/quick/dialogs/dialogs.pro
@@ -1,17 +1,4 @@
-TEMPLATE = app
+TEMPLATE = subdirs
-QT += quick qml
-SOURCES += main.cpp
-RESOURCES += dialogs.qrc ../shared/shared.qrc
-
-OTHER_FILES += \
- dialogs.qml \
- FileDialogs.qml \
- ColorDialogs.qml
-
-EXAMPLE_FILES = \
- FileDialogs.qml \
- ColorDialogs.qml
-
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/dialogs
-INSTALLS += target
+SUBDIRS = \
+ systemdialogs
diff --git a/examples/quick/dialogs/ColorDialogs.qml b/examples/quick/dialogs/systemdialogs/ColorDialogs.qml
index 6a0af7f730..6a0af7f730 100644
--- a/examples/quick/dialogs/ColorDialogs.qml
+++ b/examples/quick/dialogs/systemdialogs/ColorDialogs.qml
diff --git a/examples/quick/dialogs/FileDialogs.qml b/examples/quick/dialogs/systemdialogs/FileDialogs.qml
index d1278609f9..d1278609f9 100644
--- a/examples/quick/dialogs/FileDialogs.qml
+++ b/examples/quick/dialogs/systemdialogs/FileDialogs.qml
diff --git a/examples/quick/dialogs/doc/images/dialogs-example.jpg b/examples/quick/dialogs/systemdialogs/doc/images/systemdialogs-example.jpg
index 4517a39308..4517a39308 100644
--- a/examples/quick/dialogs/doc/images/dialogs-example.jpg
+++ b/examples/quick/dialogs/systemdialogs/doc/images/systemdialogs-example.jpg
Binary files differ
diff --git a/examples/quick/dialogs/doc/src/dialogs.qdoc b/examples/quick/dialogs/systemdialogs/doc/src/systemdialogs.qdoc
index daac914c60..9788be7343 100644
--- a/examples/quick/dialogs/doc/src/dialogs.qdoc
+++ b/examples/quick/dialogs/systemdialogs/doc/src/systemdialogs.qdoc
@@ -25,10 +25,10 @@
**
****************************************************************************/
/*!
- \title Qt Quick Dialog Examples
- \example dialogs
- \brief This example demonstrates the dialog types in QML
- \image dialogs-example.jpg
+ \title Qt Quick System Dialog Examples
+ \example systemdialogs
+ \brief This example demonstrates the system dialog types in QML
+ \image systemdialogs-example.jpg
\ingroup qtquickdialog_examples
This example demonstrates the system dialogs in the \l{Qt Quick Dialogs}
@@ -36,9 +36,13 @@
A \l FileDialog is used to choose a single file, multiple files or a
single directory, depending on how it is configured.
- \snippet dialogs/FileDialogs.qml filedialog
+ \snippet systemdialogs/FileDialogs.qml filedialog
A \l ColorDialog is used to choose a color, with or without alpha (transparency)
depending on how it is configured.
- \snippet dialogs/ColorDialogs.qml colordialog
+ \snippet systemdialogs/ColorDialogs.qml colordialog
+
+ The example can be built as a standalone executable, but each
+ type of dialog is demonstrated in a separate QML file which can
+ also be run separately with qmlscene.
*/
diff --git a/examples/quick/dialogs/main.cpp b/examples/quick/dialogs/systemdialogs/main.cpp
index bbf0c48104..2119227c1f 100644
--- a/examples/quick/dialogs/main.cpp
+++ b/examples/quick/dialogs/systemdialogs/main.cpp
@@ -37,5 +37,5 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include "../shared/shared.h"
-DECLARATIVE_EXAMPLE_MAIN(dialogs/dialogs)
+#include "../../shared/shared.h"
+DECLARATIVE_EXAMPLE_MAIN(dialogs/systemdialogs)
diff --git a/examples/quick/dialogs/systemdialogs/systemdialogs.pro b/examples/quick/dialogs/systemdialogs/systemdialogs.pro
new file mode 100644
index 0000000000..e8c3e9857b
--- /dev/null
+++ b/examples/quick/dialogs/systemdialogs/systemdialogs.pro
@@ -0,0 +1,17 @@
+TEMPLATE = app
+
+QT += quick qml
+SOURCES += main.cpp
+RESOURCES += systemdialogs.qrc ../../shared/shared.qrc
+
+OTHER_FILES += \
+ systemdialogs.qml \
+ FileDialogs.qml \
+ ColorDialogs.qml
+
+EXAMPLE_FILES = \
+ FileDialogs.qml \
+ ColorDialogs.qml
+
+target.path = $$[QT_INSTALL_EXAMPLES]/quick/dialogs
+INSTALLS += target
diff --git a/examples/quick/dialogs/dialogs.qml b/examples/quick/dialogs/systemdialogs/systemdialogs.qml
index b5f9841a3f..b5f9841a3f 100644
--- a/examples/quick/dialogs/dialogs.qml
+++ b/examples/quick/dialogs/systemdialogs/systemdialogs.qml
diff --git a/examples/quick/dialogs/dialogs.qrc b/examples/quick/dialogs/systemdialogs/systemdialogs.qrc
index efebfe4845..b90b99f7f5 100644
--- a/examples/quick/dialogs/dialogs.qrc
+++ b/examples/quick/dialogs/systemdialogs/systemdialogs.qrc
@@ -1,6 +1,6 @@
<RCC>
<qresource prefix="/dialogs">
- <file>dialogs.qml</file>
+ <file>systemdialogs.qml</file>
<file>FileDialogs.qml</file>
<file>ColorDialogs.qml</file>
</qresource>
diff --git a/examples/quick/particles/imageparticle/doc/src/imageparticle.qdoc b/examples/quick/particles/imageparticle/doc/src/imageparticle.qdoc
index 4fda13746a..ea94a4bc39 100644
--- a/examples/quick/particles/imageparticle/doc/src/imageparticle.qdoc
+++ b/examples/quick/particles/imageparticle/doc/src/imageparticle.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \title Qt Quick Particles Examples - Affectors
+ \title Qt Quick Particles Examples - Image Particles
\example particles/imageparticle
\brief This is a collection of examples using Affectors in the QML particle system.
\image qml-imageparticle-example.png
diff --git a/examples/quick/particles/system/doc/src/system.qdoc b/examples/quick/particles/system/doc/src/system.qdoc
index 99be23d9d1..385cd927da 100644
--- a/examples/quick/particles/system/doc/src/system.qdoc
+++ b/examples/quick/particles/system/doc/src/system.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \title Qt Quick Particles Examples - Affectors
+ \title Qt Quick Particles Examples - System
\example particles/system
\brief This is a collection of examples using Affectors in the QML particle system.
\image qml-system-example.png
diff --git a/src/imports/widgets/qquickqcolordialog.cpp b/src/imports/widgets/qquickqcolordialog.cpp
index abe6ffd004..d10eacee60 100644
--- a/src/imports/widgets/qquickqcolordialog.cpp
+++ b/src/imports/widgets/qquickqcolordialog.cpp
@@ -68,8 +68,11 @@ public:
virtual void exec() { m_dialog.exec(); }
virtual bool show(Qt::WindowFlags f, Qt::WindowModality m, QWindow *parent) {
- m_dialog.windowHandle()->setTransientParent(parent);
- m_dialog.windowHandle()->setFlags(f);
+ m_dialog.winId();
+ QWindow *window = m_dialog.windowHandle();
+ Q_ASSERT(window);
+ window->setTransientParent(parent);
+ window->setFlags(f);
m_dialog.setWindowModality(m);
m_dialog.setWindowTitle(QPlatformColorDialogHelper::options()->windowTitle());
m_dialog.setOptions((QColorDialog::ColorDialogOptions)((int)(QPlatformColorDialogHelper::options()->options())));
diff --git a/src/imports/widgets/qquickqfiledialog.cpp b/src/imports/widgets/qquickqfiledialog.cpp
index 672c6d1bf4..afb150b509 100644
--- a/src/imports/widgets/qquickqfiledialog.cpp
+++ b/src/imports/widgets/qquickqfiledialog.cpp
@@ -96,8 +96,11 @@ public:
virtual void exec() { m_dialog.exec(); }
virtual bool show(Qt::WindowFlags f, Qt::WindowModality m, QWindow *parent) {
- m_dialog.windowHandle()->setTransientParent(parent);
- m_dialog.windowHandle()->setFlags(f);
+ m_dialog.winId();
+ QWindow *window = m_dialog.windowHandle();
+ Q_ASSERT(window);
+ window->setTransientParent(parent);
+ window->setFlags(f);
m_dialog.setWindowModality(m);
m_dialog.show();
return m_dialog.isVisible();
diff --git a/src/quick/doc/images/qml-item-canvas-arcTo2.png b/src/quick/doc/images/qml-item-canvas.arc.png
index 5f9d32d8d3..5f9d32d8d3 100644
--- a/src/quick/doc/images/qml-item-canvas-arcTo2.png
+++ b/src/quick/doc/images/qml-item-canvas.arc.png
Binary files differ
diff --git a/src/quick/items/context2d/qquickcontext2d.cpp b/src/quick/items/context2d/qquickcontext2d.cpp
index 437c26437c..8434c0fe0c 100644
--- a/src/quick/items/context2d/qquickcontext2d.cpp
+++ b/src/quick/items/context2d/qquickcontext2d.cpp
@@ -1753,12 +1753,25 @@ static v8::Handle<v8::Value> ctx2d_strokeRect(const v8::Arguments &args)
// Complex shapes (paths) API
/*!
- \qmlmethod object QtQuick2::Context2D::arc(real x, real y, real radius, real startAngle, real endAngle, bool anticlockwise)
- Adds an arc to the current subpath that lies on the circumference of the circle whose center is at the point (\c x,\cy) and whose radius is \c radius.
- \image qml-item-canvas-arcTo2.png
- \sa arcTo,
- {http://www.w3.org/TR/2dcontext/#dom-context-2d-arc}{W3C 2d context standard for arc}
- */
+ \qmlmethod object QtQuick2::Context2D::arc(real x, real y, real radius,
+ real startAngle, real endAngle, bool anticlockwise)
+
+ Adds an arc to the current subpath that lies on the circumference of the
+ circle whose center is at the point (\a x, \a y) and whose radius is
+ \a radius.
+
+ Both \c startAngle and \c endAngle are measured from the x-axis in radians.
+
+ \image qml-item-canvas-arc.png
+
+ \image qml-item-canvas-startAngle.png
+
+ The \a anticlockwise parameter is \c true for each arc in the figure above
+ because they are all drawn in the anticlockwise direction.
+
+ \sa arcTo, {http://www.w3.org/TR/2dcontext/#dom-context-2d-arc}{W3C's 2D
+ Context Standard for arc()}
+*/
static v8::Handle<v8::Value> ctx2d_arc(const v8::Arguments &args)
{
QV8Context2DResource *r = v8_resource_cast<QV8Context2DResource>(args.This());
@@ -1787,25 +1800,28 @@ static v8::Handle<v8::Value> ctx2d_arc(const v8::Arguments &args)
}
/*!
- \qmlmethod object QtQuick2::Context2D::arcTo(real x1, real y1, real x2, real y2, real radius)
+ \qmlmethod object QtQuick2::Context2D::arcTo(real x1, real y1, real x2,
+ real y2, real radius)
+
+ Adds an arc with the given control points and radius to the current subpath,
+ connected to the previous point by a straight line. To draw an arc, you
+ begin with the same steps you followed to create a line:
- Adds an arc with the given control points and radius to the current subpath, connected to the previous point by a straight line.
- To draw an arc, you begin with the same steps your followed to create a line:
\list
- \li Call the context.beginPath() method to set a new path.
- \li Call the context.moveTo(\c x, \c y) method to set your starting position on the canvas at the point (\c x,\c y).
- \li To draw an arc or circle, call the context.arcTo(\c x1, \c y1, \c x2, \c y2,\c radius) method.
- This adds an arc with starting point (\c x1,\c y1), ending point (\c x2, \c y2), and radius \c radius to the current subpath and connects
- it to the previous subpath by a straight line.
+ \li Call the beginPath() method to set a new path.
+ \li Call the moveTo(\c x, \c y) method to set your starting position on the
+ canvas at the point (\c x, \c y).
+ \li To draw an arc or circle, call the arcTo(\a x1, \a y1, \a x2, \a y2,
+ \a radius) method. This adds an arc with starting point (\a x1, \a y1),
+ ending point (\a x2, \a y2), and \a radius to the current subpath and
+ connects it to the previous subpath by a straight line.
\endlist
+
\image qml-item-canvas-arcTo.png
- Both startAngle and endAngle are measured from the x axis in units of radians.
- \image qml-item-canvas-startAngle.png
- The anticlockwise has the value TRUE for each arc in the figure above because they are all drawn in the counterclockwise direction.
- \sa arc, {http://www.w3.org/TR/2dcontext/#dom-context-2d-arcto}{W3C 2d
- context standard for arcTo}
- */
+ \sa arc, {http://www.w3.org/TR/2dcontext/#dom-context-2d-arcto}{W3C's 2D
+ Context Standard for arcTo()}
+*/
static v8::Handle<v8::Value> ctx2d_arcTo(const v8::Arguments &args)
{
QV8Context2DResource *r = v8_resource_cast<QV8Context2DResource>(args.This());
@@ -2456,7 +2472,7 @@ static v8::Handle<v8::Value> ctx2d_measureText(const v8::Arguments &args)
\sa {http://www.w3.org/TR/2dcontext/#dom-context-2d-drawimage}{W3C 2d context standard for drawImage}
*/
/*!
- \qmlmethod QtQuick2::Context2D::drawImage(variant image, real sx, real sy, real sw, sh, real dx, real dy, real dw, dh)
+ \qmlmethod QtQuick2::Context2D::drawImage(variant image, real sx, real sy, real sw, real sh, real dx, real dy, real dw, real dh)
This is an overloaded function.
Draws the given item as \a image from source point (\a sx, \a sy) and source width \a sw, source height \a sh
onto the canvas at point (\a dx, \a dy) and with width \a dw, height \a dh.
@@ -2715,20 +2731,25 @@ v8::Handle<v8::Value> ctx2d_pixelArray_indexed_set(uint32_t index, v8::Local<v8:
return v8::Undefined();
}
/*!
- \qmlmethod CanvasImageData QtQuick2::Context2D::createImageData(real sw, real sh)
- Creates a CanvasImageData object with the given dimensions(\a sw, \a sh).
- */
+ \qmlmethod CanvasImageData QtQuick2::Context2D::createImageData(real sw, real sh)
+
+ Creates a CanvasImageData object with the given dimensions(\a sw, \a sh).
+*/
/*!
- \qmlmethod CanvasImageData QtQuick2::Context2D::createImageData(CanvasImageData imageData)
- Creates a CanvasImageData object with the same dimensions as the argument.
- */
+ \qmlmethod CanvasImageData QtQuick2::Context2D::createImageData(CanvasImageData imageData)
+
+ Creates a CanvasImageData object with the same dimensions as the argument.
+*/
/*!
- \qmlmethod CanvasImageData QtQuick2::Context2D::createImageData(Url imageUrl)
- Creates a CanvasImageData object with the given image loaded from \a imageUrl.
- Note:The \a imageUrl must be already loaded before this function call, if not, an empty
- CanvasImageData obect will be returned.
+ \qmlmethod CanvasImageData QtQuick2::Context2D::createImageData(Url imageUrl)
+
+ Creates a CanvasImageData object with the given image loaded from \a imageUrl.
+
+ \note The \a imageUrl must be already loaded before this function call,
+ otherwise an empty CanvasImageData obect will be returned.
- \sa Canvas::loadImage(), QtQuick2::Canvas::unloadImage(), QtQuick2::Canvas::isImageLoaded
+ \sa Canvas::loadImage(), QtQuick2::Canvas::unloadImage(),
+ QtQuick2::Canvas::isImageLoaded
*/
static v8::Handle<v8::Value> ctx2d_createImageData(const v8::Arguments &args)
{
diff --git a/src/quick/items/qquickanimatedsprite.cpp b/src/quick/items/qquickanimatedsprite.cpp
index f09e9bb90e..c7c66d6fdd 100644
--- a/src/quick/items/qquickanimatedsprite.cpp
+++ b/src/quick/items/qquickanimatedsprite.cpp
@@ -377,8 +377,6 @@ QQuickAnimatedSprite::QQuickAnimatedSprite(QQuickItem *parent) :
, m_pauseOffset(0)
{
setFlag(ItemHasContents);
- connect(this, SIGNAL(runningChanged(bool)),
- this, SLOT(update()));
connect(this, SIGNAL(widthChanged()),
this, SLOT(sizeVertices()));
connect(this, SIGNAL(heightChanged()),
@@ -660,7 +658,10 @@ void QQuickAnimatedSprite::prepareNextFrame()
}
if (m_loops > 0 && m_curLoop >= m_loops) {
frameAt = 0;
- m_running = false;
+ if (m_running) {
+ m_running = false;
+ emit runningChanged(false);
+ }
}
} else {
frameAt = m_curFrame;
diff --git a/src/quick/scenegraph/coreapi/qsgmaterial.cpp b/src/quick/scenegraph/coreapi/qsgmaterial.cpp
index 9346236db9..c0794d0d69 100644
--- a/src/quick/scenegraph/coreapi/qsgmaterial.cpp
+++ b/src/quick/scenegraph/coreapi/qsgmaterial.cpp
@@ -556,7 +556,6 @@ static void qt_print_material_count()
QSGMaterial::QSGMaterial()
: m_flags(0)
- , m_reserved(0)
{
#ifndef QT_NO_DEBUG
if (qsg_leak_check) {
diff --git a/src/quick/scenegraph/coreapi/qsgmaterial.h b/src/quick/scenegraph/coreapi/qsgmaterial.h
index 20ab21ad28..ee8889deac 100644
--- a/src/quick/scenegraph/coreapi/qsgmaterial.h
+++ b/src/quick/scenegraph/coreapi/qsgmaterial.h
@@ -133,7 +133,6 @@ public:
void setFlag(Flags flags, bool on = true);
private:
- friend class QSGContext;
Flags m_flags;
void *m_reserved;
Q_DISABLE_COPY(QSGMaterial)
diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp
index 866d678412..a142a23c67 100644
--- a/src/quick/scenegraph/qsgcontext.cpp
+++ b/src/quick/scenegraph/qsgcontext.cpp
@@ -507,16 +507,10 @@ QSGDepthStencilBufferManager *QSGContext::depthStencilBufferManager()
QSGMaterialShader *QSGContext::prepareMaterial(QSGMaterial *material)
{
Q_D(QSGContext);
-
- if (material->m_reserved)
- return reinterpret_cast<QSGMaterialShader *>(material->m_reserved);
-
QSGMaterialType *type = material->type();
QSGMaterialShader *shader = d->materials.value(type);
- if (shader) {
- material->m_reserved = shader;
+ if (shader)
return shader;
- }
#ifndef QSG_NO_RENDER_TIMING
if (qsg_render_timing || QQmlProfilerService::enabled)
@@ -524,7 +518,6 @@ QSGMaterialShader *QSGContext::prepareMaterial(QSGMaterial *material)
#endif
shader = material->createShader();
- material->m_reserved = shader;
shader->compile();
shader->initialize();
d->materials[type] = shader;
diff --git a/tests/auto/quick/examples/tst_examples.cpp b/tests/auto/quick/examples/tst_examples.cpp
index 9c5fb88af2..7ef07e4896 100644
--- a/tests/auto/quick/examples/tst_examples.cpp
+++ b/tests/auto/quick/examples/tst_examples.cpp
@@ -89,6 +89,7 @@ tst_examples::tst_examples()
// Add files to exclude here
excludedFiles << "examples/quick/canvas/tiger/tiger.qml"; // QTBUG-26528
excludedFiles << "snippets/qml/listmodel/listmodel.qml"; //Just a ListModel, no root QQuickItem
+ excludedFiles << "examples/quick/demos/photosurface/photosurface.qml"; // root item is Window rather than Item
// Add directories you want excluded here (don't add examples/, because they install to examples/qtdeclarative/)
excludedDirs << "shared"; //Not an example
diff --git a/tests/auto/quick/qquickanimatedsprite/data/runningChange.qml b/tests/auto/quick/qquickanimatedsprite/data/runningChange.qml
new file mode 100644
index 0000000000..9994ff6d9b
--- /dev/null
+++ b/tests/auto/quick/qquickanimatedsprite/data/runningChange.qml
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Tasuku Suzuki <stasuku@gmail.com>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Rectangle {
+ color: "black"
+ width: 320
+ height: 320
+
+ AnimatedSprite {
+ objectName: "sprite"
+ source: "squarefacesprite.png"
+ frameCount: 6
+ loops: 3
+ frameSync: true
+ running: false
+ width: 160
+ height: 160
+ }
+}
diff --git a/tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp b/tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp
index bf46b6eca8..6422e0b656 100644
--- a/tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp
+++ b/tests/auto/quick/qquickanimatedsprite/tst_qquickanimatedsprite.cpp
@@ -53,6 +53,7 @@ public:
private slots:
void initTestCase();
void test_properties();
+ void test_runningChangedSignal();
void test_frameChangedSignal();
};
@@ -87,6 +88,29 @@ void tst_qquickanimatedsprite::test_properties()
delete window;
}
+void tst_qquickanimatedsprite::test_runningChangedSignal()
+{
+ QQuickView *window = new QQuickView(0);
+
+ window->setSource(testFileUrl("runningChange.qml"));
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window));
+
+ QVERIFY(window->rootObject());
+ QQuickAnimatedSprite* sprite = window->rootObject()->findChild<QQuickAnimatedSprite*>("sprite");
+ QVERIFY(sprite);
+
+ QVERIFY(!sprite->running());
+
+ QSignalSpy runningChangedSpy(sprite, SIGNAL(runningChanged(bool)));
+ sprite->setRunning(true);
+ QTRY_COMPARE(runningChangedSpy.count(), 1);
+ QTRY_VERIFY(!sprite->running());
+ QTRY_COMPARE(runningChangedSpy.count(), 2);
+
+ delete window;
+}
+
void tst_qquickanimatedsprite::test_frameChangedSignal()
{
QQuickView *window = new QQuickView(0);
diff --git a/tests/auto/quick/touchmouse/touchmouse.pro b/tests/auto/quick/touchmouse/touchmouse.pro
index bba0abdc17..378e199bf5 100644
--- a/tests/auto/quick/touchmouse/touchmouse.pro
+++ b/tests/auto/quick/touchmouse/touchmouse.pro
@@ -13,8 +13,6 @@ TESTDATA = data/*
# OTHER_FILES += data/foo.qml
-CONFIG += parallel_test
-
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
mac:CONFIG+=insignificant_test # QTBUG-27890