summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-04-09 03:59:42 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-04-09 04:03:38 (GMT)
commitefc80769f3274d31e06308717d06a70a4249cced (patch)
treeb1cb9036ee98a6e6c257ed242effccc16c7348b3 /tests/auto
parent430c50648c78e1e8e3b2747779069fe2a0f14ed9 (diff)
downloadQt-efc80769f3274d31e06308717d06a70a4249cced.zip
Qt-efc80769f3274d31e06308717d06a70a4249cced.tar.gz
Qt-efc80769f3274d31e06308717d06a70a4249cced.tar.bz2
Replace "var" with "variant" in tests
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp16
-rw-r--r--tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp6
2 files changed, 11 insertions, 11 deletions
diff --git a/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp b/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp
index be20ba1..ae62363 100644
--- a/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp
+++ b/tests/auto/declarative/qdeclarativecontext/tst_qdeclarativecontext.cpp
@@ -228,7 +228,7 @@ private:
#define TEST_CONTEXT_PROPERTY(ctxt, name, value) \
{ \
QDeclarativeComponent component(&engine); \
- component.setData("import Qt 4.6; QtObject { property var test: " #name " }", QUrl()); \
+ component.setData("import Qt 4.6; QtObject { property variant test: " #name " }", QUrl()); \
\
QObject *obj = component.create(ctxt); \
\
@@ -278,7 +278,7 @@ void tst_qdeclarativecontext::setContextProperty()
// Changes in context properties
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; QtObject { property var test: a }", QUrl());
+ component.setData("import Qt 4.6; QtObject { property variant test: a }", QUrl());
QObject *obj = component.create(&ctxt2);
@@ -290,7 +290,7 @@ void tst_qdeclarativecontext::setContextProperty()
}
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; QtObject { property var test: b }", QUrl());
+ component.setData("import Qt 4.6; QtObject { property variant test: b }", QUrl());
QObject *obj = component.create(&ctxt2);
@@ -304,7 +304,7 @@ void tst_qdeclarativecontext::setContextProperty()
}
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; QtObject { property var test: e.a }", QUrl());
+ component.setData("import Qt 4.6; QtObject { property variant test: e.a }", QUrl());
QObject *obj = component.create(&ctxt2);
@@ -318,7 +318,7 @@ void tst_qdeclarativecontext::setContextProperty()
// New context properties
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; QtObject { property var test: a }", QUrl());
+ component.setData("import Qt 4.6; QtObject { property variant test: a }", QUrl());
QObject *obj = component.create(&ctxt2);
@@ -332,7 +332,7 @@ void tst_qdeclarativecontext::setContextProperty()
// Setting an object-variant context property
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; QtObject { id: root; property int a: 10; property int test: ctxtProp.a; property var obj: root; }", QUrl());
+ component.setData("import Qt 4.6; QtObject { id: root; property int a: 10; property int test: ctxtProp.a; property variant obj: root; }", QUrl());
QDeclarativeContext ctxt(engine.rootContext());
ctxt.setContextProperty("ctxtProp", QVariant());
@@ -380,7 +380,7 @@ void tst_qdeclarativecontext::setContextObject()
// Changes in context properties
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; QtObject { property var test: a }", QUrl());
+ component.setData("import Qt 4.6; QtObject { property variant test: a }", QUrl());
QObject *obj = component.create(&ctxt);
@@ -412,7 +412,7 @@ void tst_qdeclarativecontext::destruction()
void tst_qdeclarativecontext::idAsContextProperty()
{
QDeclarativeComponent component(&engine);
- component.setData("import Qt 4.6; QtObject { property var a; a: QtObject { id: myObject } }", QUrl());
+ component.setData("import Qt 4.6; QtObject { property variant a; a: QtObject { id: myObject } }", QUrl());
QObject *obj = component.create();
QVERIFY(obj);
diff --git a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
index 1cbe2ac..d391941 100644
--- a/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
+++ b/tests/auto/declarative/qdeclarativedom/tst_qdeclarativedom.cpp
@@ -450,7 +450,7 @@ void tst_qdeclarativedom::loadDynamicProperty()
" property url f\n"
" property color g\n"
" property date h\n"
- " property var i\n"
+ " property variant i\n"
" property QtObject j\n"
"}";
@@ -483,8 +483,8 @@ void tst_qdeclarativedom::loadDynamicProperty()
DP_TEST(5, f, QVariant::Url, 128, 14, "url");
DP_TEST(6, g, QVariant::Color, 147, 16, "color");
DP_TEST(7, h, QVariant::DateTime, 168, 15, "date");
- DP_TEST(8, i, qMetaTypeId<QVariant>(), 188, 14, "var");
- DP_TEST(9, j, -1, 207, 19, "QtObject");
+ DP_TEST(8, i, qMetaTypeId<QVariant>(), 188, 18, "variant");
+ DP_TEST(9, j, -1, 211, 19, "QtObject");
}
{