aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTasuku Suzuki <stasuku@gmail.com>2012-11-25 04:36:33 +0900
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-29 17:48:46 +0100
commite0cb13a510c0099784fee00d5b4b7c608dd42dd2 (patch)
tree8d61daaaa70df2fa7b26a0c989d748fc3718e15f
parent55f6a109e99ea2eb3359fa941a1826d4b4e11bf8 (diff)
Move no-Gui related QML types from QtQuick into QtQml
Task-number: QTBUG-26340 Change-Id: I9049128db2598bf3c7a9d677b774eaae53b54eb5 Reviewed-by: Alan Alpert <aalpert@rim.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
-rw-r--r--src/qml/qml/qml.pri11
-rw-r--r--src/qml/qml/qqmlbind.cpp (renamed from src/quick/util/qquickbind.cpp)64
-rw-r--r--src/qml/qml/qqmlbind_p.h (renamed from src/quick/util/qquickbind_p.h)16
-rw-r--r--src/qml/qml/qqmlconnections.cpp (renamed from src/quick/util/qquickconnections.cpp)54
-rw-r--r--src/qml/qml/qqmlconnections_p.h (renamed from src/quick/util/qquickconnections_p.h)16
-rw-r--r--src/qml/qml/qqmlengine.cpp8
-rw-r--r--src/qml/qml/qqmltimer.cpp (renamed from src/quick/util/qquicktimer.cpp)76
-rw-r--r--src/qml/qml/qqmltimer_p.h (renamed from src/quick/util/qquicktimer_p.h)16
-rw-r--r--src/quick/util/qquickutilmodule.cpp7
-rw-r--r--src/quick/util/util.pri6
-rw-r--r--tests/auto/qml/qml.pro7
-rw-r--r--tests/auto/qml/qqmlbinding/data/deletedObject.qml (renamed from tests/auto/qml/qquickbinding/data/deletedObject.qml)0
-rw-r--r--tests/auto/qml/qqmlbinding/data/restoreBinding.qml (renamed from tests/auto/qml/qquickbinding/data/restoreBinding.qml)0
-rw-r--r--tests/auto/qml/qqmlbinding/data/restoreBindingWithLoop.qml (renamed from tests/auto/qml/qquickbinding/data/restoreBindingWithLoop.qml)0
-rw-r--r--tests/auto/qml/qqmlbinding/data/restoreBindingWithoutCrash.qml (renamed from tests/auto/qml/qquickbinding/data/restoreBindingWithoutCrash.qml)0
-rw-r--r--tests/auto/qml/qqmlbinding/data/test-binding.qml (renamed from tests/auto/qml/qquickbinding/data/test-binding.qml)0
-rw-r--r--tests/auto/qml/qqmlbinding/data/test-binding2.qml (renamed from tests/auto/qml/qquickbinding/data/test-binding2.qml)0
-rw-r--r--tests/auto/qml/qqmlbinding/qqmlbinding.pro (renamed from tests/auto/qml/qquickbinding/qquickbinding.pro)4
-rw-r--r--tests/auto/qml/qqmlbinding/tst_qqmlbinding.cpp (renamed from tests/auto/qml/qquickbinding/tst_qquickbinding.cpp)28
-rw-r--r--tests/auto/qml/qqmlconnections/data/connection-targetchange.qml (renamed from tests/auto/qml/qquickconnection/data/connection-targetchange.qml)0
-rw-r--r--tests/auto/qml/qqmlconnections/data/connection-unknownsignals-ignored.qml8
-rw-r--r--tests/auto/qml/qqmlconnections/data/connection-unknownsignals-notarget.qml5
-rw-r--r--tests/auto/qml/qqmlconnections/data/connection-unknownsignals-parent.qml5
-rw-r--r--tests/auto/qml/qqmlconnections/data/connection-unknownsignals.qml7
-rw-r--r--tests/auto/qml/qqmlconnections/data/error-object.qml5
-rw-r--r--tests/auto/qml/qqmlconnections/data/error-property.qml3
-rw-r--r--tests/auto/qml/qqmlconnections/data/error-property2.qml3
-rw-r--r--tests/auto/qml/qqmlconnections/data/error-syntax.qml7
-rw-r--r--tests/auto/qml/qqmlconnections/data/rewriteError-global.qml (renamed from tests/auto/qml/qquickconnection/data/rewriteError-global.qml)2
-rw-r--r--tests/auto/qml/qqmlconnections/data/rewriteError-unnamed.qml (renamed from tests/auto/qml/qquickconnection/data/rewriteError-unnamed.qml)0
-rw-r--r--tests/auto/qml/qqmlconnections/data/singletontype-target.qml (renamed from tests/auto/qml/qquickconnection/data/singletontype-target.qml)6
-rw-r--r--tests/auto/qml/qqmlconnections/data/test-connection.qml (renamed from tests/auto/qml/qquickconnection/data/test-connection.qml)0
-rw-r--r--tests/auto/qml/qqmlconnections/data/test-connection2.qml (renamed from tests/auto/qml/qquickconnection/data/test-connection2.qml)2
-rw-r--r--tests/auto/qml/qqmlconnections/data/test-connection3.qml3
-rw-r--r--tests/auto/qml/qqmlconnections/data/trimming.qml10
-rw-r--r--tests/auto/qml/qqmlconnections/qqmlconnections.pro (renamed from tests/auto/qml/qquickconnection/qquickconnection.pro)4
-rw-r--r--tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp (renamed from tests/auto/qml/qquickconnection/tst_qquickconnection.cpp)68
-rw-r--r--tests/auto/qml/qqmlengine/data/qtqmlModule.5.qml3
-rw-r--r--tests/auto/qml/qqmlengine/tst_qqmlengine.cpp2
-rw-r--r--tests/auto/qml/qqmltimer/qqmltimer.pro (renamed from tests/auto/quick/qquicktimer/qquicktimer.pro)4
-rw-r--r--tests/auto/qml/qqmltimer/tst_qqmltimer.cpp (renamed from tests/auto/quick/qquicktimer/tst_qquicktimer.cpp)78
-rw-r--r--tests/auto/qml/qquickconnection/data/connection-unknownsignals-ignored.qml8
-rw-r--r--tests/auto/qml/qquickconnection/data/connection-unknownsignals-notarget.qml7
-rw-r--r--tests/auto/qml/qquickconnection/data/connection-unknownsignals-parent.qml7
-rw-r--r--tests/auto/qml/qquickconnection/data/connection-unknownsignals.qml7
-rw-r--r--tests/auto/qml/qquickconnection/data/error-object.qml7
-rw-r--r--tests/auto/qml/qquickconnection/data/error-property.qml5
-rw-r--r--tests/auto/qml/qquickconnection/data/error-property2.qml5
-rw-r--r--tests/auto/qml/qquickconnection/data/error-syntax.qml9
-rw-r--r--tests/auto/qml/qquickconnection/data/test-connection3.qml3
-rw-r--r--tests/auto/qml/qquickconnection/data/trimming.qml10
-rw-r--r--tests/auto/quick/quick.pro1
52 files changed, 300 insertions, 307 deletions
diff --git a/src/qml/qml/qml.pri b/src/qml/qml/qml.pri
index e7286c25fb..20b46f0939 100644
--- a/src/qml/qml/qml.pri
+++ b/src/qml/qml/qml.pri
@@ -52,7 +52,10 @@ SOURCES += \
$$PWD/qqmlglobal.cpp \
$$PWD/qqmlfile.cpp \
$$PWD/qqmlbundle.cpp \
- $$PWD/qqmlmemoryprofiler.cpp
+ $$PWD/qqmlmemoryprofiler.cpp \
+ $$PWD/qqmlconnections.cpp \
+ $$PWD/qqmltimer.cpp \
+ $$PWD/qqmlbind.cpp
HEADERS += \
$$PWD/qqmlglobal_p.h \
@@ -125,7 +128,11 @@ HEADERS += \
$$PWD/qqmlvaluetypeproxybinding_p.h \
$$PWD/qqmlfile.h \
$$PWD/qqmlbundle_p.h \
- $$PWD/qqmlmemoryprofiler_p.h
+ $$PWD/qqmlmemoryprofiler_p.h \
+ $$PWD/qqmlconnections_p.h \
+ $$PWD/qqmltimer_p.h \
+ $$PWD/qqmlbind_p.h
+
include(parser/parser.pri)
include(rewriter/rewriter.pri)
diff --git a/src/quick/util/qquickbind.cpp b/src/qml/qml/qqmlbind.cpp
index 7d3bc06f60..2df9693dfa 100644
--- a/src/quick/util/qquickbind.cpp
+++ b/src/qml/qml/qqmlbind.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include "qquickbind_p.h"
+#include "qqmlbind_p.h"
#include <private/qqmlnullablevalue_p_p.h>
#include <private/qqmlproperty_p.h>
@@ -58,11 +58,11 @@
QT_BEGIN_NAMESPACE
-class QQuickBindPrivate : public QObjectPrivate
+class QQmlBindPrivate : public QObjectPrivate
{
public:
- QQuickBindPrivate() : componentComplete(true), obj(0), prevBind(0) {}
- ~QQuickBindPrivate() { if (prevBind) prevBind->destroy(); }
+ QQmlBindPrivate() : componentComplete(true), obj(0), prevBind(0) {}
+ ~QQmlBindPrivate() { if (prevBind) prevBind->destroy(); }
QQmlNullableValue<bool> when;
bool componentComplete;
@@ -76,7 +76,7 @@ public:
/*!
\qmltype Binding
- \instantiates QQuickBind
+ \instantiates QQmlBind
\inqmlmodule QtQuick 2
\ingroup qtquick-interceptors
\brief Enables the arbitrary creation of property bindings
@@ -141,12 +141,12 @@ public:
\sa QtQml
*/
-QQuickBind::QQuickBind(QObject *parent)
- : QObject(*(new QQuickBindPrivate), parent)
+QQmlBind::QQmlBind(QObject *parent)
+ : QObject(*(new QQmlBindPrivate), parent)
{
}
-QQuickBind::~QQuickBind()
+QQmlBind::~QQmlBind()
{
}
@@ -166,15 +166,15 @@ QQuickBind::~QQuickBind()
When the binding becomes inactive again, any direct bindings that were previously
set on the property will be restored.
*/
-bool QQuickBind::when() const
+bool QQmlBind::when() const
{
- Q_D(const QQuickBind);
+ Q_D(const QQmlBind);
return d->when;
}
-void QQuickBind::setWhen(bool v)
+void QQmlBind::setWhen(bool v)
{
- Q_D(QQuickBind);
+ Q_D(QQmlBind);
if (!d->when.isNull && d->when == v)
return;
@@ -187,15 +187,15 @@ void QQuickBind::setWhen(bool v)
The object to be updated.
*/
-QObject *QQuickBind::object()
+QObject *QQmlBind::object()
{
- Q_D(const QQuickBind);
+ Q_D(const QQmlBind);
return d->obj;
}
-void QQuickBind::setObject(QObject *obj)
+void QQmlBind::setObject(QObject *obj)
{
- Q_D(QQuickBind);
+ Q_D(QQmlBind);
if (d->obj && d->when.isValid() && d->when) {
/* if we switch the object at runtime, we need to restore the
previous binding on the old object before continuing */
@@ -214,15 +214,15 @@ void QQuickBind::setObject(QObject *obj)
The property to be updated.
*/
-QString QQuickBind::property() const
+QString QQmlBind::property() const
{
- Q_D(const QQuickBind);
+ Q_D(const QQmlBind);
return d->propName;
}
-void QQuickBind::setProperty(const QString &p)
+void QQmlBind::setProperty(const QString &p)
{
- Q_D(QQuickBind);
+ Q_D(QQmlBind);
if (!d->propName.isEmpty() && d->when.isValid() && d->when) {
/* if we switch the property name at runtime, we need to restore the
previous binding on the old object before continuing */
@@ -242,43 +242,43 @@ void QQuickBind::setProperty(const QString &p)
The value to be set on the target object and property. This can be a
constant (which isn't very useful), or a bound expression.
*/
-QVariant QQuickBind::value() const
+QVariant QQmlBind::value() const
{
- Q_D(const QQuickBind);
+ Q_D(const QQmlBind);
return d->value.value;
}
-void QQuickBind::setValue(const QVariant &v)
+void QQmlBind::setValue(const QVariant &v)
{
- Q_D(QQuickBind);
+ Q_D(QQmlBind);
d->value = v;
eval();
}
-void QQuickBind::setTarget(const QQmlProperty &p)
+void QQmlBind::setTarget(const QQmlProperty &p)
{
- Q_D(QQuickBind);
+ Q_D(QQmlBind);
d->prop = p;
}
-void QQuickBind::classBegin()
+void QQmlBind::classBegin()
{
- Q_D(QQuickBind);
+ Q_D(QQmlBind);
d->componentComplete = false;
}
-void QQuickBind::componentComplete()
+void QQmlBind::componentComplete()
{
- Q_D(QQuickBind);
+ Q_D(QQmlBind);
d->componentComplete = true;
if (!d->prop.isValid())
d->prop = QQmlProperty(d->obj, d->propName);
eval();
}
-void QQuickBind::eval()
+void QQmlBind::eval()
{
- Q_D(QQuickBind);
+ Q_D(QQmlBind);
if (!d->prop.isValid() || d->value.isNull || !d->componentComplete)
return;
diff --git a/src/quick/util/qquickbind_p.h b/src/qml/qml/qqmlbind_p.h
index ced8aae9b3..02e2767da9 100644
--- a/src/quick/util/qquickbind_p.h
+++ b/src/qml/qml/qqmlbind_p.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QQUICKBIND_H
-#define QQUICKBIND_H
+#ifndef QQMLBIND_H
+#define QQMLBIND_H
#include <qqml.h>
@@ -50,11 +50,11 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-class QQuickBindPrivate;
-class Q_AUTOTEST_EXPORT QQuickBind : public QObject, public QQmlPropertyValueSource, public QQmlParserStatus
+class QQmlBindPrivate;
+class Q_AUTOTEST_EXPORT QQmlBind : public QObject, public QQmlPropertyValueSource, public QQmlParserStatus
{
Q_OBJECT
- Q_DECLARE_PRIVATE(QQuickBind)
+ Q_DECLARE_PRIVATE(QQmlBind)
Q_INTERFACES(QQmlParserStatus)
Q_INTERFACES(QQmlPropertyValueSource)
Q_PROPERTY(QObject *target READ object WRITE setObject)
@@ -63,8 +63,8 @@ class Q_AUTOTEST_EXPORT QQuickBind : public QObject, public QQmlPropertyValueSou
Q_PROPERTY(bool when READ when WRITE setWhen)
public:
- QQuickBind(QObject *parent=0);
- ~QQuickBind();
+ QQmlBind(QObject *parent=0);
+ ~QQmlBind();
bool when() const;
void setWhen(bool);
@@ -89,7 +89,7 @@ private:
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QQuickBind)
+QML_DECLARE_TYPE(QQmlBind)
QT_END_HEADER
diff --git a/src/quick/util/qquickconnections.cpp b/src/qml/qml/qqmlconnections.cpp
index ea3628c7fd..ab631ed3b2 100644
--- a/src/quick/util/qquickconnections.cpp
+++ b/src/qml/qml/qqmlconnections.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include "qquickconnections_p.h"
+#include "qqmlconnections_p.h"
#include <private/qqmlexpression_p.h>
#include <private/qqmlproperty_p.h>
@@ -55,10 +55,10 @@
QT_BEGIN_NAMESPACE
-class QQuickConnectionsPrivate : public QObjectPrivate
+class QQmlConnectionsPrivate : public QObjectPrivate
{
public:
- QQuickConnectionsPrivate() : target(0), targetSet(false), ignoreUnknownSignals(false), componentcomplete(true) {}
+ QQmlConnectionsPrivate() : target(0), targetSet(false), ignoreUnknownSignals(false), componentcomplete(true) {}
QList<QQmlBoundSignal*> boundsignals;
QObject *target;
@@ -72,7 +72,7 @@ public:
/*!
\qmltype Connections
- \instantiates QQuickConnections
+ \instantiates QQmlConnections
\inqmlmodule QtQuick 2
\ingroup qtquick-interceptors
\brief Describes generalized connections to signals
@@ -128,12 +128,12 @@ public:
\sa QtQml
*/
-QQuickConnections::QQuickConnections(QObject *parent) :
- QObject(*(new QQuickConnectionsPrivate), parent)
+QQmlConnections::QQmlConnections(QObject *parent) :
+ QObject(*(new QQmlConnectionsPrivate), parent)
{
}
-QQuickConnections::~QQuickConnections()
+QQmlConnections::~QQmlConnections()
{
}
@@ -146,9 +146,9 @@ QQuickConnections::~QQuickConnections()
If set to null, no connection is made and any signal handlers are ignored
until the target is not null.
*/
-QObject *QQuickConnections::target() const
+QObject *QQmlConnections::target() const
{
- Q_D(const QQuickConnections);
+ Q_D(const QQmlConnections);
return d->targetSet ? d->target : parent();
}
@@ -162,9 +162,9 @@ private:
QQmlBoundSignal *m_signal;
};
-void QQuickConnections::setTarget(QObject *obj)
+void QQmlConnections::setTarget(QObject *obj)
{
- Q_D(QQuickConnections);
+ Q_D(QQmlConnections);
d->targetSet = true; // even if setting to 0, it is *set*
if (d->target == obj)
return;
@@ -191,15 +191,15 @@ void QQuickConnections::setTarget(QObject *obj)
This is useful if you intend to connect to different types of objects, handling
a different set of signals for each object.
*/
-bool QQuickConnections::ignoreUnknownSignals() const
+bool QQmlConnections::ignoreUnknownSignals() const
{
- Q_D(const QQuickConnections);
+ Q_D(const QQmlConnections);
return d->ignoreUnknownSignals;
}
-void QQuickConnections::setIgnoreUnknownSignals(bool ignore)
+void QQmlConnections::setIgnoreUnknownSignals(bool ignore)
{
- Q_D(QQuickConnections);
+ Q_D(QQmlConnections);
d->ignoreUnknownSignals = ignore;
}
@@ -218,7 +218,7 @@ QQmlConnectionsParser::compile(const QList<QQmlCustomParserProperty> &props)
int propColumn = props.at(ii).location().column;
if (!propName.startsWith(QLatin1String("on")) || !propName.at(2).isUpper()) {
- error(props.at(ii), QQuickConnections::tr("Cannot assign to non-existent property \"%1\"").arg(propName));
+ error(props.at(ii), QQmlConnections::tr("Cannot assign to non-existent property \"%1\"").arg(propName));
return QByteArray();
}
@@ -228,10 +228,10 @@ QQmlConnectionsParser::compile(const QList<QQmlCustomParserProperty> &props)
const QVariant &value = values.at(i);
if (value.userType() == qMetaTypeId<QQmlCustomParserNode>()) {
- error(props.at(ii), QQuickConnections::tr("Connections: nested objects not allowed"));
+ error(props.at(ii), QQmlConnections::tr("Connections: nested objects not allowed"));
return QByteArray();
} else if (value.userType() == qMetaTypeId<QQmlCustomParserProperty>()) {
- error(props.at(ii), QQuickConnections::tr("Connections: syntax error"));
+ error(props.at(ii), QQmlConnections::tr("Connections: syntax error"));
return QByteArray();
} else {
QQmlScript::Variant v = qvariant_cast<QQmlScript::Variant>(value);
@@ -241,7 +241,7 @@ QQmlConnectionsParser::compile(const QList<QQmlCustomParserProperty> &props)
ds << propLine;
ds << propColumn;
} else {
- error(props.at(ii), QQuickConnections::tr("Connections: script expected"));
+ error(props.at(ii), QQmlConnections::tr("Connections: script expected"));
return QByteArray();
}
}
@@ -254,15 +254,15 @@ QQmlConnectionsParser::compile(const QList<QQmlCustomParserProperty> &props)
void QQmlConnectionsParser::setCustomData(QObject *object,
const QByteArray &data)
{
- QQuickConnectionsPrivate *p =
- static_cast<QQuickConnectionsPrivate *>(QObjectPrivate::get(object));
+ QQmlConnectionsPrivate *p =
+ static_cast<QQmlConnectionsPrivate *>(QObjectPrivate::get(object));
p->data = data;
}
-void QQuickConnections::connectSignals()
+void QQmlConnections::connectSignals()
{
- Q_D(QQuickConnections);
+ Q_D(QQmlConnections);
if (!d->componentcomplete || (d->targetSet && !target()))
return;
@@ -305,15 +305,15 @@ void QQuickConnections::connectSignals()
}
}
-void QQuickConnections::classBegin()
+void QQmlConnections::classBegin()
{
- Q_D(QQuickConnections);
+ Q_D(QQmlConnections);
d->componentcomplete=false;
}
-void QQuickConnections::componentComplete()
+void QQmlConnections::componentComplete()
{
- Q_D(QQuickConnections);
+ Q_D(QQmlConnections);
d->componentcomplete=true;
connectSignals();
}
diff --git a/src/quick/util/qquickconnections_p.h b/src/qml/qml/qqmlconnections_p.h
index 0a8e716b8a..5791166efe 100644
--- a/src/quick/util/qquickconnections_p.h
+++ b/src/qml/qml/qqmlconnections_p.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QQUICKCONNECTIONS_H
-#define QQUICKCONNECTIONS_H
+#ifndef QQMLCONNECTIONS_H
+#define QQMLCONNECTIONS_H
#include <qqml.h>
#include <private/qqmlcustomparser_p.h>
@@ -54,19 +54,19 @@ QT_BEGIN_NAMESPACE
class QQmlBoundSignal;
class QQmlContext;
-class QQuickConnectionsPrivate;
-class Q_AUTOTEST_EXPORT QQuickConnections : public QObject, public QQmlParserStatus
+class QQmlConnectionsPrivate;
+class Q_AUTOTEST_EXPORT QQmlConnections : public QObject, public QQmlParserStatus
{
Q_OBJECT
- Q_DECLARE_PRIVATE(QQuickConnections)
+ Q_DECLARE_PRIVATE(QQmlConnections)
Q_INTERFACES(QQmlParserStatus)
Q_PROPERTY(QObject *target READ target WRITE setTarget NOTIFY targetChanged)
Q_PROPERTY(bool ignoreUnknownSignals READ ignoreUnknownSignals WRITE setIgnoreUnknownSignals)
public:
- QQuickConnections(QObject *parent=0);
- ~QQuickConnections();
+ QQmlConnections(QObject *parent=0);
+ ~QQmlConnections();
QObject *target() const;
void setTarget(QObject *);
@@ -93,7 +93,7 @@ public:
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QQuickConnections)
+QML_DECLARE_TYPE(QQmlConnections)
QT_END_HEADER
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 1376ad7106..9db8927fd9 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -89,6 +89,10 @@
#include <private/qqmllocale_p.h>
+#include "qqmlbind_p.h"
+#include "qqmlconnections_p.h"
+#include "qqmltimer_p.h"
+
#ifdef Q_OS_WIN // for %APPDATA%
#include <qt_windows.h>
#include <qlibrary.h>
@@ -172,6 +176,10 @@ void QQmlEnginePrivate::registerBaseTypes(const char *uri, int versionMajor, int
{
qmlRegisterType<QQmlComponent>(uri,versionMajor,versionMinor,"Component");
qmlRegisterType<QObject>(uri,versionMajor,versionMinor,"QtObject");
+ qmlRegisterType<QQmlBind>(uri, versionMajor, versionMinor,"Binding");
+ qmlRegisterType<QQmlConnections>(uri, versionMajor, versionMinor,"Connections");
+ qmlRegisterType<QQmlTimer>(uri, versionMajor, versionMinor,"Timer");
+ qmlRegisterCustomType<QQmlConnections>(uri, versionMajor, versionMinor,"Connections", new QQmlConnectionsParser);
}
diff --git a/src/quick/util/qquicktimer.cpp b/src/qml/qml/qqmltimer.cpp
index c7cdc70bc6..c07a28c506 100644
--- a/src/quick/util/qquicktimer.cpp
+++ b/src/qml/qml/qqmltimer.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include "qquicktimer_p.h"
+#include "qqmltimer_p.h"
#include <QtCore/qcoreapplication.h>
#include "private/qpauseanimationjob_p.h"
@@ -51,16 +51,16 @@ QT_BEGIN_NAMESPACE
-class QQuickTimerPrivate : public QObjectPrivate, public QAnimationJobChangeListener
+class QQmlTimerPrivate : public QObjectPrivate, public QAnimationJobChangeListener
{
- Q_DECLARE_PUBLIC(QQuickTimer)
+ Q_DECLARE_PUBLIC(QQmlTimer)
public:
- QQuickTimerPrivate()
+ QQmlTimerPrivate()
: interval(1000), running(false), repeating(false), triggeredOnStart(false)
, classBegun(false), componentComplete(false), firstTick(true) {}
virtual void animationFinished(QAbstractAnimationJob *);
- virtual void animationCurrentLoopChanged(QAbstractAnimationJob *) { Q_Q(QQuickTimer); q->ticked(); }
+ virtual void animationCurrentLoopChanged(QAbstractAnimationJob *) { Q_Q(QQmlTimer); q->ticked(); }
int interval;
QPauseAnimationJob pause;
@@ -74,7 +74,7 @@ public:
/*!
\qmltype Timer
- \instantiates QQuickTimer
+ \instantiates QQmlTimer
\inqmlmodule QtQuick 2
\ingroup qtquick-interceptors
\brief Triggers a handler at a specified interval
@@ -112,10 +112,10 @@ public:
\sa {declarative/toys/clocks}{Clocks example}
*/
-QQuickTimer::QQuickTimer(QObject *parent)
- : QObject(*(new QQuickTimerPrivate), parent)
+QQmlTimer::QQmlTimer(QObject *parent)
+ : QObject(*(new QQmlTimerPrivate), parent)
{
- Q_D(QQuickTimer);
+ Q_D(QQmlTimer);
d->pause.addAnimationChangeListener(d, QAbstractAnimationJob::Completion | QAbstractAnimationJob::CurrentLoop);
d->pause.setLoopCount(1);
d->pause.setDuration(d->interval);
@@ -128,9 +128,9 @@ QQuickTimer::QQuickTimer(QObject *parent)
The default interval is 1000 milliseconds.
*/
-void QQuickTimer::setInterval(int interval)
+void QQmlTimer::setInterval(int interval)
{
- Q_D(QQuickTimer);
+ Q_D(QQmlTimer);
if (interval != d->interval) {
d->interval = interval;
update();
@@ -138,9 +138,9 @@ void QQuickTimer::setInterval(int interval)
}
}
-int QQuickTimer::interval() const
+int QQmlTimer::interval() const
{
- Q_D(const QQuickTimer);
+ Q_D(const QQmlTimer);
return d->interval;
}
@@ -155,15 +155,15 @@ int QQuickTimer::interval() const
\sa repeat
*/
-bool QQuickTimer::isRunning() const
+bool QQmlTimer::isRunning() const
{
- Q_D(const QQuickTimer);
+ Q_D(const QQmlTimer);
return d->running;
}
-void QQuickTimer::setRunning(bool running)
+void QQmlTimer::setRunning(bool running)
{
- Q_D(QQuickTimer);
+ Q_D(QQmlTimer);
if (d->running != running) {
d->running = running;
d->firstTick = true;
@@ -183,15 +183,15 @@ void QQuickTimer::setRunning(bool running)
\sa running
*/
-bool QQuickTimer::isRepeating() const
+bool QQmlTimer::isRepeating() const
{
- Q_D(const QQuickTimer);
+ Q_D(const QQmlTimer);
return d->repeating;
}
-void QQuickTimer::setRepeating(bool repeating)
+void QQmlTimer::setRepeating(bool repeating)
{
- Q_D(QQuickTimer);
+ Q_D(QQmlTimer);
if (repeating != d->repeating) {
d->repeating = repeating;
update();
@@ -216,15 +216,15 @@ void QQuickTimer::setRepeating(bool repeating)
\sa running
*/
-bool QQuickTimer::triggeredOnStart() const
+bool QQmlTimer::triggeredOnStart() const
{
- Q_D(const QQuickTimer);
+ Q_D(const QQmlTimer);
return d->triggeredOnStart;
}
-void QQuickTimer::setTriggeredOnStart(bool triggeredOnStart)
+void QQmlTimer::setTriggeredOnStart(bool triggeredOnStart)
{
- Q_D(QQuickTimer);
+ Q_D(QQmlTimer);
if (d->triggeredOnStart != triggeredOnStart) {
d->triggeredOnStart = triggeredOnStart;
update();
@@ -239,7 +239,7 @@ void QQuickTimer::setTriggeredOnStart(bool triggeredOnStart)
If the timer is already running, calling this method has no effect. The
\c running property will be true following a call to \c start().
*/
-void QQuickTimer::start()
+void QQmlTimer::start()
{
setRunning(true);
}
@@ -251,7 +251,7 @@ void QQuickTimer::start()
If the timer is not running, calling this method has no effect. The
\c running property will be false following a call to \c stop().
*/
-void QQuickTimer::stop()
+void QQmlTimer::stop()
{
setRunning(false);
}
@@ -264,15 +264,15 @@ void QQuickTimer::stop()
stopped, reset to initial state and started. The \c running property
will be true following a call to \c restart().
*/
-void QQuickTimer::restart()
+void QQmlTimer::restart()
{
setRunning(false);
setRunning(true);
}
-void QQuickTimer::update()
+void QQmlTimer::update()
{
- Q_D(QQuickTimer);
+ Q_D(QQmlTimer);
if (d->classBegun && !d->componentComplete)
return;
d->pause.stop();
@@ -288,15 +288,15 @@ void QQuickTimer::update()
}
}
-void QQuickTimer::classBegin()
+void QQmlTimer::classBegin()
{
- Q_D(QQuickTimer);
+ Q_D(QQmlTimer);
d->classBegun = true;
}
-void QQuickTimer::componentComplete()
+void QQmlTimer::componentComplete()
{
- Q_D(QQuickTimer);
+ Q_D(QQmlTimer);
d->componentComplete = true;
update();
}
@@ -306,17 +306,17 @@ void QQuickTimer::componentComplete()
This handler is called when the Timer is triggered.
*/
-void QQuickTimer::ticked()
+void QQmlTimer::ticked()
{
- Q_D(QQuickTimer);
+ Q_D(QQmlTimer);
if (d->running && (d->pause.currentTime() > 0 || (d->triggeredOnStart && d->firstTick)))
emit triggered();
d->firstTick = false;
}
-void QQuickTimerPrivate::animationFinished(QAbstractAnimationJob *)
+void QQmlTimerPrivate::animationFinished(QAbstractAnimationJob *)
{
- Q_Q(QQuickTimer);
+ Q_Q(QQmlTimer);
if (repeating || !running)
return;
running = false;
diff --git a/src/quick/util/qquicktimer_p.h b/src/qml/qml/qqmltimer_p.h
index 91bac9e9c0..ec9046d945 100644
--- a/src/quick/util/qquicktimer_p.h
+++ b/src/qml/qml/qqmltimer_p.h
@@ -39,24 +39,24 @@
**
****************************************************************************/
-#ifndef QQUICKTIMER_H
-#define QQUICKTIMER_H
+#ifndef QQMLTIMER_H
+#define QQMLTIMER_H
#include <qqml.h>
#include <QtCore/qobject.h>
-#include <private/qtquickglobal_p.h>
+#include <private/qtqmlglobal_p.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-class QQuickTimerPrivate;
-class Q_AUTOTEST_EXPORT QQuickTimer : public QObject, public QQmlParserStatus
+class QQmlTimerPrivate;
+class Q_AUTOTEST_EXPORT QQmlTimer : public QObject, public QQmlParserStatus
{
Q_OBJECT
- Q_DECLARE_PRIVATE(QQuickTimer)
+ Q_DECLARE_PRIVATE(QQmlTimer)
Q_INTERFACES(QQmlParserStatus)
Q_PROPERTY(int interval READ interval WRITE setInterval NOTIFY intervalChanged)
Q_PROPERTY(bool running READ isRunning WRITE setRunning NOTIFY runningChanged)
@@ -65,7 +65,7 @@ class Q_AUTOTEST_EXPORT QQuickTimer : public QObject, public QQmlParserStatus
Q_PROPERTY(QObject *parent READ parent CONSTANT)
public:
- QQuickTimer(QObject *parent=0);
+ QQmlTimer(QObject *parent=0);
void setInterval(int interval);
int interval() const;
@@ -104,7 +104,7 @@ private Q_SLOTS:
QT_END_NAMESPACE
-QML_DECLARE_TYPE(QQuickTimer)
+QML_DECLARE_TYPE(QQmlTimer)
QT_END_HEADER
diff --git a/src/quick/util/qquickutilmodule.cpp b/src/quick/util/qquickutilmodule.cpp
index 7ecb792b73..0491e941f4 100644
--- a/src/quick/util/qquickutilmodule.cpp
+++ b/src/quick/util/qquickutilmodule.cpp
@@ -43,8 +43,6 @@
#include "qquickanimation_p.h"
#include "qquickanimation_p_p.h"
#include "qquickbehavior_p.h"
-#include "qquickbind_p.h"
-#include "qquickconnections_p.h"
#include "qquicksmoothedanimation_p.h"
#include "qquickfontloader_p.h"
#include "qquickpackage_p.h"
@@ -55,7 +53,6 @@
#include "qquickstate_p.h"
#include "qquickstate_p_p.h"
#include "qquicksystempalette_p.h"
-#include "qquicktimer_p.h"
#include "qquicktransition_p.h"
#include <qqmlinfo.h>
#include <private/qqmltypenotavailable_p.h>
@@ -72,9 +69,7 @@ void QQuickUtilModule::defineModule()
qmlRegisterUncreatableType<QQuickAbstractAnimation>("QtQuick",2,0,"Animation",QQuickAbstractAnimation::tr("Animation is an abstract class"));
qmlRegisterType<QQuickBehavior>("QtQuick",2,0,"Behavior");
- qmlRegisterType<QQuickBind>("QtQuick",2,0,"Binding");
qmlRegisterType<QQuickColorAnimation>("QtQuick",2,0,"ColorAnimation");
- qmlRegisterType<QQuickConnections>("QtQuick",2,0,"Connections");
qmlRegisterType<QQuickSmoothedAnimation>("QtQuick",2,0,"SmoothedAnimation");
qmlRegisterType<QQuickFontLoader>("QtQuick",2,0,"FontLoader");
qmlRegisterType<QQuickNumberAnimation>("QtQuick",2,0,"NumberAnimation");
@@ -92,12 +87,10 @@ void QQuickUtilModule::defineModule()
qmlRegisterType<QQuickStateGroup>("QtQuick",2,0,"StateGroup");
qmlRegisterType<QQuickState>("QtQuick",2,0,"State");
qmlRegisterType<QQuickSystemPalette>("QtQuick",2,0,"SystemPalette");
- qmlRegisterType<QQuickTimer>("QtQuick",2,0,"Timer");
qmlRegisterType<QQuickTransition>("QtQuick",2,0,"Transition");
qmlRegisterType<QQuickVector3dAnimation>("QtQuick",2,0,"Vector3dAnimation");
qmlRegisterType<QQuickStateOperation>();
qmlRegisterCustomType<QQuickPropertyChanges>("QtQuick",2,0,"PropertyChanges", new QQuickPropertyChangesParser);
- qmlRegisterCustomType<QQuickConnections>("QtQuick",2,0,"Connections", new QQmlConnectionsParser);
}
diff --git a/src/quick/util/util.pri b/src/quick/util/util.pri
index 3d93b9f2f5..7a56a95314 100644
--- a/src/quick/util/util.pri
+++ b/src/quick/util/util.pri
@@ -1,7 +1,6 @@
SOURCES += \
$$PWD/qquickapplication.cpp\
$$PWD/qquickutilmodule.cpp\
- $$PWD/qquickconnections.cpp \
$$PWD/qquickpackage.cpp \
$$PWD/qquickanimation.cpp \
$$PWD/qquicksystempalette.cpp \
@@ -16,8 +15,6 @@ SOURCES += \
$$PWD/qquicktransition.cpp \
$$PWD/qquicklistaccessor.cpp \
$$PWD/qquicktimeline.cpp \
- $$PWD/qquicktimer.cpp \
- $$PWD/qquickbind.cpp \
$$PWD/qquickpixmapcache.cpp \
$$PWD/qquickbehavior.cpp \
$$PWD/qquickfontloader.cpp \
@@ -34,7 +31,6 @@ SOURCES += \
HEADERS += \
$$PWD/qquickapplication_p.h\
$$PWD/qquickutilmodule_p.h\
- $$PWD/qquickconnections_p.h \
$$PWD/qquickpackage_p.h \
$$PWD/qquickanimation_p.h \
$$PWD/qquickanimation_p_p.h \
@@ -52,8 +48,6 @@ HEADERS += \
$$PWD/qquicktransition_p.h \
$$PWD/qquicklistaccessor_p.h \
$$PWD/qquicktimeline_p_p.h \
- $$PWD/qquicktimer_p.h \
- $$PWD/qquickbind_p.h \
$$PWD/qquickpixmapcache_p.h \
$$PWD/qquickbehavior_p.h \
$$PWD/qquickfontloader_p.h \
diff --git a/tests/auto/qml/qml.pro b/tests/auto/qml/qml.pro
index a9fa7648dd..bbef36167e 100644
--- a/tests/auto/qml/qml.pro
+++ b/tests/auto/qml/qml.pro
@@ -41,16 +41,17 @@ PRIVATETESTS += \
qqmlsqldatabase \
qqmlvaluetypes \
qqmlvaluetypeproviders \
- qquickbinding \
+ qqmlbinding \
qquickchangeset \
- qquickconnection \
+ qqmlconnections \
qquicklistcompositor \
qquicklistmodel \
qquicklistmodelworkerscript \
qquickworkerscript \
qqmlbundle \
qrcqml \
- v4
+ v4 \
+ qqmltimer
!contains(QT_CONFIG, no-widgets) {
PUBLICTESTS += \
diff --git a/tests/auto/qml/qquickbinding/data/deletedObject.qml b/tests/auto/qml/qqmlbinding/data/deletedObject.qml
index f9cf869ba3..f9cf869ba3 100644
--- a/tests/auto/qml/qquickbinding/data/deletedObject.qml
+++ b/tests/auto/qml/qqmlbinding/data/deletedObject.qml
diff --git a/tests/auto/qml/qquickbinding/data/restoreBinding.qml b/tests/auto/qml/qqmlbinding/data/restoreBinding.qml
index 9491c0f1d3..9491c0f1d3 100644
--- a/tests/auto/qml/qquickbinding/data/restoreBinding.qml
+++ b/tests/auto/qml/qqmlbinding/data/restoreBinding.qml
diff --git a/tests/auto/qml/qquickbinding/data/restoreBindingWithLoop.qml b/tests/auto/qml/qqmlbinding/data/restoreBindingWithLoop.qml
index ee07104817..ee07104817 100644
--- a/tests/auto/qml/qquickbinding/data/restoreBindingWithLoop.qml
+++ b/tests/auto/qml/qqmlbinding/data/restoreBindingWithLoop.qml
diff --git a/tests/auto/qml/qquickbinding/data/restoreBindingWithoutCrash.qml b/tests/auto/qml/qqmlbinding/data/restoreBindingWithoutCrash.qml
index 0c63a16213..0c63a16213 100644
--- a/tests/auto/qml/qquickbinding/data/restoreBindingWithoutCrash.qml
+++ b/tests/auto/qml/qqmlbinding/data/restoreBindingWithoutCrash.qml
diff --git a/tests/auto/qml/qquickbinding/data/test-binding.qml b/tests/auto/qml/qqmlbinding/data/test-binding.qml
index 87aabe975a..87aabe975a 100644
--- a/tests/auto/qml/qquickbinding/data/test-binding.qml
+++ b/tests/auto/qml/qqmlbinding/data/test-binding.qml
diff --git a/tests/auto/qml/qquickbinding/data/test-binding2.qml b/tests/auto/qml/qqmlbinding/data/test-binding2.qml
index 4a08141d11..4a08141d11 100644
--- a/tests/auto/qml/qquickbinding/data/test-binding2.qml
+++ b/tests/auto/qml/qqmlbinding/data/test-binding2.qml
diff --git a/tests/auto/qml/qquickbinding/qquickbinding.pro b/tests/auto/qml/qqmlbinding/qqmlbinding.pro
index e209f8144b..35a5f1ca74 100644
--- a/tests/auto/qml/qquickbinding/qquickbinding.pro
+++ b/tests/auto/qml/qqmlbinding/qqmlbinding.pro
@@ -1,8 +1,8 @@
CONFIG += testcase
-TARGET = tst_qquickbinding
+TARGET = tst_qqmlbinding
macx:CONFIG -= app_bundle
-SOURCES += tst_qquickbinding.cpp
+SOURCES += tst_qqmlbinding.cpp
include (../../shared/util.pri)
diff --git a/tests/auto/qml/qquickbinding/tst_qquickbinding.cpp b/tests/auto/qml/qqmlbinding/tst_qqmlbinding.cpp
index 9d9b5ff79c..4c411fb5ec 100644
--- a/tests/auto/qml/qquickbinding/tst_qquickbinding.cpp
+++ b/tests/auto/qml/qqmlbinding/tst_qqmlbinding.cpp
@@ -41,15 +41,15 @@
#include <qtest.h>
#include <QtQml/qqmlengine.h>
#include <QtQml/qqmlcomponent.h>
-#include <private/qquickbind_p.h>
+#include <private/qqmlbind_p.h>
#include <QtQuick/private/qquickrectangle_p.h>
#include "../../shared/util.h"
-class tst_qquickbinding : public QQmlDataTest
+class tst_qqmlbinding : public QQmlDataTest
{
Q_OBJECT
public:
- tst_qquickbinding();
+ tst_qqmlbinding();
private slots:
void binding();
@@ -63,18 +63,18 @@ private:
QQmlEngine engine;
};
-tst_qquickbinding::tst_qquickbinding()
+tst_qqmlbinding::tst_qqmlbinding()
{
}
-void tst_qquickbinding::binding()
+void tst_qqmlbinding::binding()
{
QQmlEngine engine;
QQmlComponent c(&engine, testFileUrl("test-binding.qml"));
QQuickRectangle *rect = qobject_cast<QQuickRectangle*>(c.create());
QVERIFY(rect != 0);
- QQuickBind *binding3 = qobject_cast<QQuickBind*>(rect->findChild<QQuickBind*>("binding3"));
+ QQmlBind *binding3 = qobject_cast<QQmlBind*>(rect->findChild<QQmlBind*>("binding3"));
QVERIFY(binding3 != 0);
QCOMPARE(rect->color(), QColor("yellow"));
@@ -86,7 +86,7 @@ void tst_qquickbinding::binding()
QCOMPARE(binding3->when(), true);
- QQuickBind *binding = qobject_cast<QQuickBind*>(rect->findChild<QQuickBind*>("binding1"));
+ QQmlBind *binding = qobject_cast<QQmlBind*>(rect->findChild<QQmlBind*>("binding1"));
QVERIFY(binding != 0);
QCOMPARE(binding->object(), qobject_cast<QObject*>(rect));
QCOMPARE(binding->property(), QLatin1String("text"));
@@ -95,7 +95,7 @@ void tst_qquickbinding::binding()
delete rect;
}
-void tst_qquickbinding::whenAfterValue()
+void tst_qqmlbinding::whenAfterValue()
{
QQmlEngine engine;
QQmlComponent c(&engine, testFileUrl("test-binding2.qml"));
@@ -111,7 +111,7 @@ void tst_qquickbinding::whenAfterValue()
delete rect;
}
-void tst_qquickbinding::restoreBinding()
+void tst_qqmlbinding::restoreBinding()
{
QQmlEngine engine;
QQmlComponent c(&engine, testFileUrl("restoreBinding.qml"));
@@ -141,7 +141,7 @@ void tst_qquickbinding::restoreBinding()
delete rect;
}
-void tst_qquickbinding::restoreBindingWithLoop()
+void tst_qqmlbinding::restoreBindingWithLoop()
{
QQmlEngine engine;
QQmlComponent c(&engine, testFileUrl("restoreBindingWithLoop.qml"));
@@ -177,7 +177,7 @@ void tst_qquickbinding::restoreBindingWithLoop()
delete rect;
}
-void tst_qquickbinding::restoreBindingWithoutCrash()
+void tst_qqmlbinding::restoreBindingWithoutCrash()
{
QQmlEngine engine;
QQmlComponent c(&engine, testFileUrl("restoreBindingWithoutCrash.qml"));
@@ -217,7 +217,7 @@ void tst_qquickbinding::restoreBindingWithoutCrash()
}
//QTBUG-20692
-void tst_qquickbinding::deletedObject()
+void tst_qqmlbinding::deletedObject()
{
QQmlEngine engine;
QQmlComponent c(&engine, testFileUrl("deletedObject.qml"));
@@ -232,6 +232,6 @@ void tst_qquickbinding::deletedObject()
delete rect;
}
-QTEST_MAIN(tst_qquickbinding)
+QTEST_MAIN(tst_qqmlbinding)
-#include "tst_qquickbinding.moc"
+#include "tst_qqmlbinding.moc"
diff --git a/tests/auto/qml/qquickconnection/data/connection-targetchange.qml b/tests/auto/qml/qqmlconnections/data/connection-targetchange.qml
index 154c309c9c..154c309c9c 100644
--- a/tests/auto/qml/qquickconnection/data/connection-targetchange.qml
+++ b/tests/auto/qml/qqmlconnections/data/connection-targetchange.qml
diff --git a/tests/auto/qml/qqmlconnections/data/connection-unknownsignals-ignored.qml b/tests/auto/qml/qqmlconnections/data/connection-unknownsignals-ignored.qml
new file mode 100644
index 0000000000..0780dd1509
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/connection-unknownsignals-ignored.qml
@@ -0,0 +1,8 @@
+import QtQml 2.0
+
+QtObject {
+ id: root
+
+ property Connections c1: Connections { target: root; onNotFooBar1: {} ignoreUnknownSignals: true }
+ property Connections c2: Connections { objectName: "connections"; onNotFooBar2: {} ignoreUnknownSignals: true }
+}
diff --git a/tests/auto/qml/qqmlconnections/data/connection-unknownsignals-notarget.qml b/tests/auto/qml/qqmlconnections/data/connection-unknownsignals-notarget.qml
new file mode 100644
index 0000000000..3da3e0f5d1
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/connection-unknownsignals-notarget.qml
@@ -0,0 +1,5 @@
+import QtQml 2.0
+
+QtObject {
+ property Connections c1: Connections { objectName: "connections"; target: null; onNotFooBar: {} }
+}
diff --git a/tests/auto/qml/qqmlconnections/data/connection-unknownsignals-parent.qml b/tests/auto/qml/qqmlconnections/data/connection-unknownsignals-parent.qml
new file mode 100644
index 0000000000..2c55215579
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/connection-unknownsignals-parent.qml
@@ -0,0 +1,5 @@
+import QtQml 2.0
+
+QtObject {
+ property Connections c1: Connections { objectName: "connections"; onFooBar: {} }
+}
diff --git a/tests/auto/qml/qqmlconnections/data/connection-unknownsignals.qml b/tests/auto/qml/qqmlconnections/data/connection-unknownsignals.qml
new file mode 100644
index 0000000000..a351016b4a
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/connection-unknownsignals.qml
@@ -0,0 +1,7 @@
+import QtQml 2.0
+
+QtObject {
+ id: screen
+
+ property Connections c1: Connections { objectName: "connections"; target: screen; onFooBar: {} }
+}
diff --git a/tests/auto/qml/qqmlconnections/data/error-object.qml b/tests/auto/qml/qqmlconnections/data/error-object.qml
new file mode 100644
index 0000000000..8594811aa1
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/error-object.qml
@@ -0,0 +1,5 @@
+import QtQml 2.0
+
+Connections {
+ onClicked: Timer {}
+}
diff --git a/tests/auto/qml/qqmlconnections/data/error-property.qml b/tests/auto/qml/qqmlconnections/data/error-property.qml
new file mode 100644
index 0000000000..b08a4a504a
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/error-property.qml
@@ -0,0 +1,3 @@
+import QtQml 2.0
+
+Connections { fakeProperty: {} }
diff --git a/tests/auto/qml/qqmlconnections/data/error-property2.qml b/tests/auto/qml/qqmlconnections/data/error-property2.qml
new file mode 100644
index 0000000000..fcfbf5b412
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/error-property2.qml
@@ -0,0 +1,3 @@
+import QtQml 2.0
+
+Connections { onfakeProperty: {} }
diff --git a/tests/auto/qml/qqmlconnections/data/error-syntax.qml b/tests/auto/qml/qqmlconnections/data/error-syntax.qml
new file mode 100644
index 0000000000..62c841bdb1
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/error-syntax.qml
@@ -0,0 +1,7 @@
+import QtQml 2.0
+
+Connections {
+ onClicked {
+ onPressed: {}
+ }
+}
diff --git a/tests/auto/qml/qquickconnection/data/rewriteError-global.qml b/tests/auto/qml/qqmlconnections/data/rewriteError-global.qml
index bd18b9df9a..1d0b557069 100644
--- a/tests/auto/qml/qquickconnection/data/rewriteError-global.qml
+++ b/tests/auto/qml/qqmlconnections/data/rewriteError-global.qml
@@ -1,4 +1,4 @@
-import QtQuick 2.0
+import QtQml 2.0
import Test 1.0
TestObject {
diff --git a/tests/auto/qml/qquickconnection/data/rewriteError-unnamed.qml b/tests/auto/qml/qqmlconnections/data/rewriteError-unnamed.qml
index a4849e994b..a4849e994b 100644
--- a/tests/auto/qml/qquickconnection/data/rewriteError-unnamed.qml
+++ b/tests/auto/qml/qqmlconnections/data/rewriteError-unnamed.qml
diff --git a/tests/auto/qml/qquickconnection/data/singletontype-target.qml b/tests/auto/qml/qqmlconnections/data/singletontype-target.qml
index df6f8a0301..7de488c2dd 100644
--- a/tests/auto/qml/qquickconnection/data/singletontype-target.qml
+++ b/tests/auto/qml/qqmlconnections/data/singletontype-target.qml
@@ -1,7 +1,7 @@
-import QtQuick 2.0
+import QtQml 2.0
import MyTestSingletonType 1.0 as MyTestSingletonType
-Item {
+QtObject {
id: rootObject
objectName: "rootObject"
property int newIntPropValue: 12
@@ -14,7 +14,7 @@ Item {
newIntPropValue = newIntPropValue + 1;
}
- Connections {
+ property Connections c: Connections {
target: MyTestSingletonType.Api
onIntPropChanged: moduleIntPropChangedCount = moduleIntPropChangedCount + 1;
onOtherSignal: moduleOtherSignalCount = moduleOtherSignalCount + 1;
diff --git a/tests/auto/qml/qquickconnection/data/test-connection.qml b/tests/auto/qml/qqmlconnections/data/test-connection.qml
index ce851fc3db..ce851fc3db 100644
--- a/tests/auto/qml/qquickconnection/data/test-connection.qml
+++ b/tests/auto/qml/qqmlconnections/data/test-connection.qml
diff --git a/tests/auto/qml/qquickconnection/data/test-connection2.qml b/tests/auto/qml/qqmlconnections/data/test-connection2.qml
index b23d2fc145..a7e264c332 100644
--- a/tests/auto/qml/qquickconnection/data/test-connection2.qml
+++ b/tests/auto/qml/qqmlconnections/data/test-connection2.qml
@@ -1,3 +1,3 @@
-import QtQuick 2.0
+import QtQml 2.0
Connections { id: connection; target: connection; onTargetChanged: 1 == 1 }
diff --git a/tests/auto/qml/qqmlconnections/data/test-connection3.qml b/tests/auto/qml/qqmlconnections/data/test-connection3.qml
new file mode 100644
index 0000000000..9aaca2213a
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/test-connection3.qml
@@ -0,0 +1,3 @@
+import QtQml 2.0
+
+Connections {}
diff --git a/tests/auto/qml/qqmlconnections/data/trimming.qml b/tests/auto/qml/qqmlconnections/data/trimming.qml
new file mode 100644
index 0000000000..4c37eb22af
--- /dev/null
+++ b/tests/auto/qml/qqmlconnections/data/trimming.qml
@@ -0,0 +1,10 @@
+import QtQml 2.0
+
+QtObject {
+ id: root
+
+ property string tested
+ signal testMe(int param1, string param2)
+
+ property Connections c: Connections { target: root; onTestMe: root.tested = param2 + param1 }
+}
diff --git a/tests/auto/qml/qquickconnection/qquickconnection.pro b/tests/auto/qml/qqmlconnections/qqmlconnections.pro
index b00bc070e7..52f85f6219 100644
--- a/tests/auto/qml/qquickconnection/qquickconnection.pro
+++ b/tests/auto/qml/qqmlconnections/qqmlconnections.pro
@@ -1,8 +1,8 @@
CONFIG += testcase
-TARGET = tst_qquickconnection
+TARGET = tst_qqmlconnections
macx:CONFIG -= app_bundle
-SOURCES += tst_qquickconnection.cpp
+SOURCES += tst_qqmlconnections.cpp
include (../../shared/util.pri)
diff --git a/tests/auto/qml/qquickconnection/tst_qquickconnection.cpp b/tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp
index d54e5a9db4..b9e31d2216 100644
--- a/tests/auto/qml/qquickconnection/tst_qquickconnection.cpp
+++ b/tests/auto/qml/qqmlconnections/tst_qqmlconnections.cpp
@@ -41,16 +41,16 @@
#include <qtest.h>
#include <QtQml/qqmlengine.h>
#include <QtQml/qqmlcomponent.h>
-#include <private/qquickconnections_p.h>
+#include <private/qqmlconnections_p.h>
#include <private/qquickitem_p.h>
#include "../../shared/util.h"
#include <QtQml/qqmlscriptstring.h>
-class tst_qquickconnection : public QQmlDataTest
+class tst_qqmlconnections : public QQmlDataTest
{
Q_OBJECT
public:
- tst_qquickconnection();
+ tst_qqmlconnections();
private slots:
void defaultValues();
@@ -69,15 +69,15 @@ private:
QQmlEngine engine;
};
-tst_qquickconnection::tst_qquickconnection()
+tst_qqmlconnections::tst_qqmlconnections()
{
}
-void tst_qquickconnection::defaultValues()
+void tst_qqmlconnections::defaultValues()
{
QQmlEngine engine;
QQmlComponent c(&engine, testFileUrl("test-connection3.qml"));
- QQuickConnections *item = qobject_cast<QQuickConnections*>(c.create());
+ QQmlConnections *item = qobject_cast<QQmlConnections*>(c.create());
QVERIFY(item != 0);
QVERIFY(item->target() == 0);
@@ -85,11 +85,11 @@ void tst_qquickconnection::defaultValues()
delete item;
}
-void tst_qquickconnection::properties()
+void tst_qqmlconnections::properties()
{
QQmlEngine engine;
QQmlComponent c(&engine, testFileUrl("test-connection2.qml"));
- QQuickConnections *item = qobject_cast<QQuickConnections*>(c.create());
+ QQmlConnections *item = qobject_cast<QQmlConnections*>(c.create());
QVERIFY(item != 0);
@@ -99,7 +99,7 @@ void tst_qquickconnection::properties()
delete item;
}
-void tst_qquickconnection::connection()
+void tst_qqmlconnections::connection()
{
QQmlEngine engine;
QQmlComponent c(&engine, testFileUrl("test-connection.qml"));
@@ -116,35 +116,35 @@ void tst_qquickconnection::connection()
delete item;
}
-void tst_qquickconnection::trimming()
+void tst_qqmlconnections::trimming()
{
QQmlEngine engine;
QQmlComponent c(&engine, testFileUrl("trimming.qml"));
- QQuickItem *item = qobject_cast<QQuickItem*>(c.create());
+ QObject *object = c.create();
- QVERIFY(item != 0);
+ QVERIFY(object != 0);
- QCOMPARE(item->property("tested").toString(), QString(""));
- int index = item->metaObject()->indexOfSignal("testMe(int,QString)");
- QMetaMethod method = item->metaObject()->method(index);
- method.invoke(item,
+ QCOMPARE(object->property("tested").toString(), QString(""));
+ int index = object->metaObject()->indexOfSignal("testMe(int,QString)");
+ QMetaMethod method = object->metaObject()->method(index);
+ method.invoke(object,
Qt::DirectConnection,
Q_ARG(int, 5),
Q_ARG(QString, "worked"));
- QCOMPARE(item->property("tested").toString(), QString("worked5"));
+ QCOMPARE(object->property("tested").toString(), QString("worked5"));
- delete item;
+ delete object;
}
// Confirm that target can be changed by one of our signal handlers
-void tst_qquickconnection::targetChanged()
+void tst_qqmlconnections::targetChanged()
{
QQmlEngine engine;
QQmlComponent c(&engine, testFileUrl("connection-targetchange.qml"));
QQuickItem *item = qobject_cast<QQuickItem*>(c.create());
QVERIFY(item != 0);
- QQuickConnections *connections = item->findChild<QQuickConnections*>("connections");
+ QQmlConnections *connections = item->findChild<QQmlConnections*>("connections");
QVERIFY(connections);
QQuickItem *item1 = item->findChild<QQuickItem*>("item1");
@@ -161,18 +161,18 @@ void tst_qquickconnection::targetChanged()
delete item;
}
-void tst_qquickconnection::unknownSignals_data()
+void tst_qqmlconnections::unknownSignals_data()
{
QTest::addColumn<QString>("file");
QTest::addColumn<QString>("error");
- QTest::newRow("basic") << "connection-unknownsignals.qml" << ":6:5: QML Connections: Cannot assign to non-existent property \"onFooBar\"";
- QTest::newRow("parent") << "connection-unknownsignals-parent.qml" << ":6:5: QML Connections: Cannot assign to non-existent property \"onFooBar\"";
+ QTest::newRow("basic") << "connection-unknownsignals.qml" << ":6:30: QML Connections: Cannot assign to non-existent property \"onFooBar\"";
+ QTest::newRow("parent") << "connection-unknownsignals-parent.qml" << ":4:30: QML Connections: Cannot assign to non-existent property \"onFooBar\"";
QTest::newRow("ignored") << "connection-unknownsignals-ignored.qml" << ""; // should be NO error
QTest::newRow("notarget") << "connection-unknownsignals-notarget.qml" << ""; // should be NO error
}
-void tst_qquickconnection::unknownSignals()
+void tst_qqmlconnections::unknownSignals()
{
QFETCH(QString, file);
QFETCH(QString, error);
@@ -186,20 +186,20 @@ void tst_qquickconnection::unknownSignals()
QQmlEngine engine;
QQmlComponent c(&engine, url);
- QQuickItem *item = qobject_cast<QQuickItem*>(c.create());
- QVERIFY(item != 0);
+ QObject *object = c.create();
+ QVERIFY(object != 0);
// check that connection is created (they are all runtime errors)
- QQuickConnections *connections = item->findChild<QQuickConnections*>("connections");
+ QQmlConnections *connections = object->findChild<QQmlConnections*>("connections");
QVERIFY(connections);
if (file == "connection-unknownsignals-ignored.qml")
QVERIFY(connections->ignoreUnknownSignals());
- delete item;
+ delete object;
}
-void tst_qquickconnection::errors_data()
+void tst_qqmlconnections::errors_data()
{
QTest::addColumn<QString>("file");
QTest::addColumn<QString>("error");
@@ -210,7 +210,7 @@ void tst_qquickconnection::errors_data()
QTest::newRow("grouped object") << "error-syntax.qml" << "Connections: syntax error";
}
-void tst_qquickconnection::errors()
+void tst_qqmlconnections::errors()
{
QFETCH(QString, file);
QFETCH(QString, error);
@@ -245,7 +245,7 @@ private:
bool m_ran;
};
-void tst_qquickconnection::rewriteErrors()
+void tst_qqmlconnections::rewriteErrors()
{
qmlRegisterType<TestObject>("Test", 1, 0, "TestObject");
{
@@ -312,7 +312,7 @@ static QObject *module_api_factory(QQmlEngine *engine, QJSEngine *scriptEngine)
}
// QTBUG-20937
-void tst_qquickconnection::singletonTypeTarget()
+void tst_qqmlconnections::singletonTypeTarget()
{
qmlRegisterSingletonType<MyTestSingletonType>("MyTestSingletonType", 1, 0, "Api", module_api_factory);
QQmlComponent component(&engine, testFileUrl("singletontype-target.qml"));
@@ -338,6 +338,6 @@ void tst_qquickconnection::singletonTypeTarget()
delete object;
}
-QTEST_MAIN(tst_qquickconnection)
+QTEST_MAIN(tst_qqmlconnections)
-#include "tst_qquickconnection.moc"
+#include "tst_qqmlconnections.moc"
diff --git a/tests/auto/qml/qqmlengine/data/qtqmlModule.5.qml b/tests/auto/qml/qqmlengine/data/qtqmlModule.5.qml
index 7a4fe5ed24..26018b5782 100644
--- a/tests/auto/qml/qqmlengine/data/qtqmlModule.5.qml
+++ b/tests/auto/qml/qqmlengine/data/qtqmlModule.5.qml
@@ -2,4 +2,7 @@ import QtQml 2.0
QtObject {
property Component c
+ property Timer timer
+ property Connections connections: Connections {}
+ property Binding binding
}
diff --git a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp
index 937a8b1c56..128294bbcb 100644
--- a/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp
+++ b/tests/auto/qml/qqmlengine/tst_qqmlengine.cpp
@@ -593,7 +593,7 @@ void tst_qqmlengine::qtqmlModule_data()
<< QString(testFileUrl("qtqmlModule.4.qml").toString() + QLatin1String(":1 module \"QtQml\" version 2.5 is not installed\n"))
<< QStringList();
- QTest::newRow("QtQml 2.0 module provides Component and QtObject")
+ QTest::newRow("QtQml 2.0 module provides Component, QtObject, Connections, Binding and Timer")
<< testFileUrl("qtqmlModule.5.qml")
<< QString()
<< QStringList();
diff --git a/tests/auto/quick/qquicktimer/qquicktimer.pro b/tests/auto/qml/qqmltimer/qqmltimer.pro
index 60f862a508..28f8e6959f 100644
--- a/tests/auto/quick/qquicktimer/qquicktimer.pro
+++ b/tests/auto/qml/qqmltimer/qqmltimer.pro
@@ -1,8 +1,8 @@
CONFIG += testcase
-TARGET = tst_qquicktimer
+TARGET = tst_qqmltimer
macx:CONFIG -= app_bundle
-SOURCES += tst_qquicktimer.cpp
+SOURCES += tst_qqmltimer.cpp
CONFIG += parallel_test
QT += core-private gui-private qml-private quick-private gui testlib
diff --git a/tests/auto/quick/qquicktimer/tst_qquicktimer.cpp b/tests/auto/qml/qqmltimer/tst_qqmltimer.cpp
index 8d5da84821..87010c28ee 100644
--- a/tests/auto/quick/qquicktimer/tst_qquicktimer.cpp
+++ b/tests/auto/qml/qqmltimer/tst_qqmltimer.cpp
@@ -42,15 +42,15 @@
#include <qtest.h>
#include <QtQml/qqmlengine.h>
#include <QtQml/qqmlcomponent.h>
-#include <QtQuick/private/qquicktimer_p.h>
+#include <QtQml/private/qqmltimer_p.h>
#include <QtQuick/qquickitem.h>
#include <QDebug>
-class tst_qquicktimer : public QObject
+class tst_qqmltimer : public QObject
{
Q_OBJECT
public:
- tst_qquicktimer();
+ tst_qqmltimer();
private slots:
void notRepeating();
@@ -84,16 +84,16 @@ public slots:
#define TIMEOUT_TIMEOUT 200
-tst_qquicktimer::tst_qquicktimer()
+tst_qqmltimer::tst_qqmltimer()
{
}
-void tst_qquicktimer::notRepeating()
+void tst_qqmltimer::notRepeating()
{
QQmlEngine engine;
QQmlComponent component(&engine);
component.setData(QByteArray("import QtQuick 2.0\nTimer { interval: 100; running: true }"), QUrl::fromLocalFile(""));
- QQuickTimer *timer = qobject_cast<QQuickTimer*>(component.create());
+ QQmlTimer *timer = qobject_cast<QQmlTimer*>(component.create());
QVERIFY(timer != 0);
QVERIFY(timer->isRunning());
QVERIFY(!timer->isRepeating());
@@ -109,12 +109,12 @@ void tst_qquicktimer::notRepeating()
QVERIFY(timer->isRunning() == false);
}
-void tst_qquicktimer::notRepeatingStart()
+void tst_qqmltimer::notRepeatingStart()
{
QQmlEngine engine;
QQmlComponent component(&engine);
- component.setData(QByteArray("import QtQuick 2.0\nTimer { interval: 100 }"), QUrl::fromLocalFile(""));
- QQuickTimer *timer = qobject_cast<QQuickTimer*>(component.create());
+ component.setData(QByteArray("import QtQml 2.0\nTimer { interval: 100 }"), QUrl::fromLocalFile(""));
+ QQmlTimer *timer = qobject_cast<QQmlTimer*>(component.create());
QVERIFY(timer != 0);
QVERIFY(!timer->isRunning());
@@ -134,12 +134,12 @@ void tst_qquicktimer::notRepeatingStart()
delete timer;
}
-void tst_qquicktimer::repeat()
+void tst_qqmltimer::repeat()
{
QQmlEngine engine;
QQmlComponent component(&engine);
- component.setData(QByteArray("import QtQuick 2.0\nTimer { interval: 100; repeat: true; running: true }"), QUrl::fromLocalFile(""));
- QQuickTimer *timer = qobject_cast<QQuickTimer*>(component.create());
+ component.setData(QByteArray("import QtQml 2.0\nTimer { interval: 100; repeat: true; running: true }"), QUrl::fromLocalFile(""));
+ QQmlTimer *timer = qobject_cast<QQmlTimer*>(component.create());
QVERIFY(timer != 0);
TimerHelper helper;
@@ -176,12 +176,12 @@ void tst_qquicktimer::repeat()
delete timer;
}
-void tst_qquicktimer::triggeredOnStart()
+void tst_qqmltimer::triggeredOnStart()
{
QQmlEngine engine;
QQmlComponent component(&engine);
- component.setData(QByteArray("import QtQuick 2.0\nTimer { interval: 100; running: true; triggeredOnStart: true }"), QUrl::fromLocalFile(""));
- QQuickTimer *timer = qobject_cast<QQuickTimer*>(component.create());
+ component.setData(QByteArray("import QtQml 2.0\nTimer { interval: 100; running: true; triggeredOnStart: true }"), QUrl::fromLocalFile(""));
+ QQmlTimer *timer = qobject_cast<QQmlTimer*>(component.create());
QVERIFY(timer != 0);
QVERIFY(timer->triggeredOnStart());
@@ -211,12 +211,12 @@ void tst_qquicktimer::triggeredOnStart()
delete timer;
}
-void tst_qquicktimer::triggeredOnStartRepeat()
+void tst_qqmltimer::triggeredOnStartRepeat()
{
QQmlEngine engine;
QQmlComponent component(&engine);
- component.setData(QByteArray("import QtQuick 2.0\nTimer { interval: 100; running: true; triggeredOnStart: true; repeat: true }"), QUrl::fromLocalFile(""));
- QQuickTimer *timer = qobject_cast<QQuickTimer*>(component.create());
+ component.setData(QByteArray("import QtQml 2.0\nTimer { interval: 100; running: true; triggeredOnStart: true; repeat: true }"), QUrl::fromLocalFile(""));
+ QQmlTimer *timer = qobject_cast<QQmlTimer*>(component.create());
QVERIFY(timer != 0);
TimerHelper helper;
@@ -234,15 +234,15 @@ void tst_qquicktimer::triggeredOnStartRepeat()
delete timer;
}
-void tst_qquicktimer::noTriggerIfNotRunning()
+void tst_qqmltimer::noTriggerIfNotRunning()
{
QQmlEngine engine;
QQmlComponent component(&engine);
component.setData(QByteArray(
- "import QtQuick 2.0\n"
- "Item { property bool ok: true\n"
- "Timer { id: t1; interval: 100; repeat: true; running: true; onTriggered: if (!running) ok=false }"
- "Timer { interval: 10; running: true; onTriggered: t1.running=false }"
+ "import QtQml 2.0\n"
+ "QtObject { property bool ok: true\n"
+ "property Timer timer1: Timer { id: t1; interval: 100; repeat: true; running: true; onTriggered: if (!running) ok=false }"
+ "property Timer timer2: Timer { interval: 10; running: true; onTriggered: t1.running=false }"
"}"
), QUrl::fromLocalFile(""));
QObject *item = component.create();
@@ -253,12 +253,12 @@ void tst_qquicktimer::noTriggerIfNotRunning()
delete item;
}
-void tst_qquicktimer::changeDuration()
+void tst_qqmltimer::changeDuration()
{
QQmlEngine engine;
QQmlComponent component(&engine);
- component.setData(QByteArray("import QtQuick 2.0\nTimer { interval: 200; repeat: true; running: true }"), QUrl::fromLocalFile(""));
- QQuickTimer *timer = qobject_cast<QQuickTimer*>(component.create());
+ component.setData(QByteArray("import QtQml 2.0\nTimer { interval: 200; repeat: true; running: true }"), QUrl::fromLocalFile(""));
+ QQmlTimer *timer = qobject_cast<QQmlTimer*>(component.create());
QVERIFY(timer != 0);
TimerHelper helper;
@@ -289,12 +289,12 @@ void tst_qquicktimer::changeDuration()
delete timer;
}
-void tst_qquicktimer::restart()
+void tst_qqmltimer::restart()
{
QQmlEngine engine;
QQmlComponent component(&engine);
- component.setData(QByteArray("import QtQuick 2.0\nTimer { interval: 500; repeat: true; running: true }"), QUrl::fromLocalFile(""));
- QQuickTimer *timer = qobject_cast<QQuickTimer*>(component.create());
+ component.setData(QByteArray("import QtQml 2.0\nTimer { interval: 500; repeat: true; running: true }"), QUrl::fromLocalFile(""));
+ QQmlTimer *timer = qobject_cast<QQmlTimer*>(component.create());
QVERIFY(timer != 0);
TimerHelper helper;
@@ -316,18 +316,18 @@ void tst_qquicktimer::restart()
delete timer;
}
-void tst_qquicktimer::restartFromTriggered()
+void tst_qqmltimer::restartFromTriggered()
{
QQmlEngine engine;
QQmlComponent component(&engine);
- component.setData(QByteArray("import QtQuick 2.0\nTimer { "
+ component.setData(QByteArray("import QtQml 2.0\nTimer { "
"interval: 500; "
"repeat: false; "
"running: true; "
"onTriggered: restart()"
" }"), QUrl::fromLocalFile(""));
QScopedPointer<QObject> object(component.create());
- QQuickTimer *timer = qobject_cast<QQuickTimer*>(object.data());
+ QQmlTimer *timer = qobject_cast<QQmlTimer*>(object.data());
QVERIFY(timer != 0);
TimerHelper helper;
@@ -343,11 +343,11 @@ void tst_qquicktimer::restartFromTriggered()
QVERIFY(timer->isRunning());
}
-void tst_qquicktimer::runningFromTriggered()
+void tst_qqmltimer::runningFromTriggered()
{
QQmlEngine engine;
QQmlComponent component(&engine);
- component.setData(QByteArray("import QtQuick 2.0\nTimer { "
+ component.setData(QByteArray("import QtQml 2.0\nTimer { "
"property bool ok: false; "
"interval: 500; "
"repeat: false; "
@@ -355,7 +355,7 @@ void tst_qquicktimer::runningFromTriggered()
"onTriggered: { ok = !running; running = true }"
" }"), QUrl::fromLocalFile(""));
QScopedPointer<QObject> object(component.create());
- QQuickTimer *timer = qobject_cast<QQuickTimer*>(object.data());
+ QQmlTimer *timer = qobject_cast<QQmlTimer*>(object.data());
QVERIFY(timer != 0);
TimerHelper helper;
@@ -373,14 +373,14 @@ void tst_qquicktimer::runningFromTriggered()
QVERIFY(timer->isRunning());
}
-void tst_qquicktimer::parentProperty()
+void tst_qqmltimer::parentProperty()
{
QQmlEngine engine;
QQmlComponent component(&engine);
component.setData(QByteArray("import QtQuick 2.0\nItem { Timer { objectName: \"timer\"; running: parent.visible } }"), QUrl::fromLocalFile(""));
QQuickItem *item = qobject_cast<QQuickItem*>(component.create());
QVERIFY(item != 0);
- QQuickTimer *timer = item->findChild<QQuickTimer*>("timer");
+ QQmlTimer *timer = item->findChild<QQmlTimer*>("timer");
QVERIFY(timer != 0);
QVERIFY(timer->isRunning());
@@ -388,6 +388,6 @@ void tst_qquicktimer::parentProperty()
delete timer;
}
-QTEST_MAIN(tst_qquicktimer)
+QTEST_MAIN(tst_qqmltimer)
-#include "tst_qquicktimer.moc"
+#include "tst_qqmltimer.moc"
diff --git a/tests/auto/qml/qquickconnection/data/connection-unknownsignals-ignored.qml b/tests/auto/qml/qquickconnection/data/connection-unknownsignals-ignored.qml
deleted file mode 100644
index 05d06bda94..0000000000
--- a/tests/auto/qml/qquickconnection/data/connection-unknownsignals-ignored.qml
+++ /dev/null
@@ -1,8 +0,0 @@
-import QtQuick 2.0
-
-Item {
- id: screen
-
- Connections { target: screen; onNotFooBar1: {} ignoreUnknownSignals: true }
- Connections { objectName: "connections"; onNotFooBar2: {} ignoreUnknownSignals: true }
-}
diff --git a/tests/auto/qml/qquickconnection/data/connection-unknownsignals-notarget.qml b/tests/auto/qml/qquickconnection/data/connection-unknownsignals-notarget.qml
deleted file mode 100644
index 9d25cba649..0000000000
--- a/tests/auto/qml/qquickconnection/data/connection-unknownsignals-notarget.qml
+++ /dev/null
@@ -1,7 +0,0 @@
-import QtQuick 2.0
-
-Item {
- id: screen
-
- Connections { objectName: "connections"; target: null; onNotFooBar: {} }
-}
diff --git a/tests/auto/qml/qquickconnection/data/connection-unknownsignals-parent.qml b/tests/auto/qml/qquickconnection/data/connection-unknownsignals-parent.qml
deleted file mode 100644
index bcd281256f..0000000000
--- a/tests/auto/qml/qquickconnection/data/connection-unknownsignals-parent.qml
+++ /dev/null
@@ -1,7 +0,0 @@
-import QtQuick 2.0
-
-Item {
- id: screen
-
- Connections { objectName: "connections"; onFooBar: {} }
-}
diff --git a/tests/auto/qml/qquickconnection/data/connection-unknownsignals.qml b/tests/auto/qml/qquickconnection/data/connection-unknownsignals.qml
deleted file mode 100644
index ad8d4d91a8..0000000000
--- a/tests/auto/qml/qquickconnection/data/connection-unknownsignals.qml
+++ /dev/null
@@ -1,7 +0,0 @@
-import QtQuick 2.0
-
-Item {
- id: screen
-
- Connections { objectName: "connections"; target: screen; onFooBar: {} }
-}
diff --git a/tests/auto/qml/qquickconnection/data/error-object.qml b/tests/auto/qml/qquickconnection/data/error-object.qml
deleted file mode 100644
index 256b2626a7..0000000000
--- a/tests/auto/qml/qquickconnection/data/error-object.qml
+++ /dev/null
@@ -1,7 +0,0 @@
-import QtQuick 2.0
-
-Item {
- Connections {
- onClicked: Item {}
- }
-}
diff --git a/tests/auto/qml/qquickconnection/data/error-property.qml b/tests/auto/qml/qquickconnection/data/error-property.qml
deleted file mode 100644
index a602479783..0000000000
--- a/tests/auto/qml/qquickconnection/data/error-property.qml
+++ /dev/null
@@ -1,5 +0,0 @@
-import QtQuick 2.0
-
-Item {
- Connections { fakeProperty: {} }
-}
diff --git a/tests/auto/qml/qquickconnection/data/error-property2.qml b/tests/auto/qml/qquickconnection/data/error-property2.qml
deleted file mode 100644
index 8123afe707..0000000000
--- a/tests/auto/qml/qquickconnection/data/error-property2.qml
+++ /dev/null
@@ -1,5 +0,0 @@
-import QtQuick 2.0
-
-Item {
- Connections { onfakeProperty: {} }
-}
diff --git a/tests/auto/qml/qquickconnection/data/error-syntax.qml b/tests/auto/qml/qquickconnection/data/error-syntax.qml
deleted file mode 100644
index 16c0534b68..0000000000
--- a/tests/auto/qml/qquickconnection/data/error-syntax.qml
+++ /dev/null
@@ -1,9 +0,0 @@
-import QtQuick 2.0
-
-Item {
- Connections {
- onClicked {
- onPressed: {}
- }
- }
-}
diff --git a/tests/auto/qml/qquickconnection/data/test-connection3.qml b/tests/auto/qml/qquickconnection/data/test-connection3.qml
deleted file mode 100644
index 9e88f0ff8f..0000000000
--- a/tests/auto/qml/qquickconnection/data/test-connection3.qml
+++ /dev/null
@@ -1,3 +0,0 @@
-import QtQuick 2.0
-
-Connections {}
diff --git a/tests/auto/qml/qquickconnection/data/trimming.qml b/tests/auto/qml/qquickconnection/data/trimming.qml
deleted file mode 100644
index 6692050deb..0000000000
--- a/tests/auto/qml/qquickconnection/data/trimming.qml
+++ /dev/null
@@ -1,10 +0,0 @@
-import QtQuick 2.0
-
-Item {
- id: screen; width: 50
-
- property string tested
- signal testMe(int param1, string param2)
-
- Connections { target: screen; onTestMe: screen.tested = param2 + param1 }
-}
diff --git a/tests/auto/quick/quick.pro b/tests/auto/quick/quick.pro
index abc5e7a4af..5f18fc94bf 100644
--- a/tests/auto/quick/quick.pro
+++ b/tests/auto/quick/quick.pro
@@ -25,7 +25,6 @@ PRIVATETESTS += \
qquickstyledtext \
qquickstates \
qquicksystempalette \
- qquicktimer \
qquickxmllistmodel
# This test requires the xmlpatterns module