aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp54
-rw-r--r--tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp14
2 files changed, 34 insertions, 34 deletions
diff --git a/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp b/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp
index 55f93c62c9..353e4ee7db 100644
--- a/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp
+++ b/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp
@@ -245,7 +245,7 @@ private:
QCOMPARE(obj->property("test"), value); \
\
delete obj; \
-}
+}
void tst_qqmlcontext::setContextProperty()
{
@@ -287,56 +287,56 @@ void tst_qqmlcontext::setContextProperty()
// Changes in context properties
{
- QQmlComponent component(&engine);
+ QQmlComponent component(&engine);
component.setData("import QtQuick 2.0; QtObject { property variant test: a }", QUrl());
- QObject *obj = component.create(&ctxt2);
+ QObject *obj = component.create(&ctxt2);
- QCOMPARE(obj->property("test"), QVariant(13));
+ QCOMPARE(obj->property("test"), QVariant(13));
ctxt.setContextProperty("a", QVariant(19));
- QCOMPARE(obj->property("test"), QVariant(19));
+ QCOMPARE(obj->property("test"), QVariant(19));
- delete obj;
+ delete obj;
}
{
- QQmlComponent component(&engine);
+ QQmlComponent component(&engine);
component.setData("import QtQuick 2.0; QtObject { property variant test: b }", QUrl());
- QObject *obj = component.create(&ctxt2);
+ QObject *obj = component.create(&ctxt2);
- QCOMPARE(obj->property("test"), QVariant(8));
+ QCOMPARE(obj->property("test"), QVariant(8));
ctxt.setContextProperty("b", QVariant(5));
- QCOMPARE(obj->property("test"), QVariant(8));
+ QCOMPARE(obj->property("test"), QVariant(8));
ctxt2.setContextProperty("b", QVariant(1912));
- QCOMPARE(obj->property("test"), QVariant(1912));
+ QCOMPARE(obj->property("test"), QVariant(1912));
- delete obj;
+ delete obj;
}
{
- QQmlComponent component(&engine);
+ QQmlComponent component(&engine);
component.setData("import QtQuick 2.0; QtObject { property variant test: e.a }", QUrl());
- QObject *obj = component.create(&ctxt2);
+ QObject *obj = component.create(&ctxt2);
- QCOMPARE(obj->property("test"), QVariant(12));
+ QCOMPARE(obj->property("test"), QVariant(12));
obj1.setA(13);
- QCOMPARE(obj->property("test"), QVariant(13));
+ QCOMPARE(obj->property("test"), QVariant(13));
- delete obj;
+ delete obj;
}
// New context properties
{
- QQmlComponent component(&engine);
+ QQmlComponent component(&engine);
component.setData("import QtQuick 2.0; QtObject { property variant test: a }", QUrl());
- QObject *obj = component.create(&ctxt2);
+ QObject *obj = component.create(&ctxt2);
- QCOMPARE(obj->property("test"), QVariant(19));
+ QCOMPARE(obj->property("test"), QVariant(19));
ctxt2.setContextProperty("a", QVariant(1945));
- QCOMPARE(obj->property("test"), QVariant(1945));
+ QCOMPARE(obj->property("test"), QVariant(1945));
- delete obj;
+ delete obj;
}
// Setting an object-variant context property
@@ -389,16 +389,16 @@ void tst_qqmlcontext::setContextObject()
// Changes in context properties
{
- QQmlComponent component(&engine);
+ QQmlComponent component(&engine);
component.setData("import QtQuick 2.0; QtObject { property variant test: a }", QUrl());
- QObject *obj = component.create(&ctxt);
+ QObject *obj = component.create(&ctxt);
- QCOMPARE(obj->property("test"), QVariant(12));
+ QCOMPARE(obj->property("test"), QVariant(12));
to.setA(14);
- QCOMPARE(obj->property("test"), QVariant(14));
+ QCOMPARE(obj->property("test"), QVariant(14));
- delete obj;
+ delete obj;
}
}
diff --git a/tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp b/tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp
index 658874f46d..b8e47c80ec 100644
--- a/tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp
+++ b/tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp
@@ -461,8 +461,8 @@ void tst_qqmlproperty::qmlmetaproperty_object()
void tst_qqmlproperty::qmlmetaproperty_object_string()
{
- QObject object;
- PropertyObject dobject;
+ QObject object;
+ PropertyObject dobject;
{
QQmlProperty prop(&object, QString("defaultProperty"));
@@ -765,8 +765,8 @@ void tst_qqmlproperty::qmlmetaproperty_object_context()
void tst_qqmlproperty::qmlmetaproperty_object_string_context()
{
- QObject object;
- PropertyObject dobject;
+ QObject object;
+ PropertyObject dobject;
{
QQmlProperty prop(&object, QString("defaultProperty"), engine.rootContext());
@@ -966,7 +966,7 @@ void tst_qqmlproperty::qmlmetaproperty_object_string_context()
void tst_qqmlproperty::name()
{
- {
+ {
QQmlProperty p;
QCOMPARE(p.name(), QString());
}
@@ -1039,7 +1039,7 @@ void tst_qqmlproperty::name()
void tst_qqmlproperty::read()
{
- // Invalid
+ // Invalid
{
QQmlProperty p;
QCOMPARE(p.read(), QVariant());
@@ -1108,7 +1108,7 @@ void tst_qqmlproperty::read()
QCOMPARE(p.read(), QVariant());
}
- // Automatic signal property
+ // Automatic signal property
{
PropertyObject o;
QQmlProperty p(&o, "onPropertyWithNotifyChanged");