summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2009-08-27 07:44:17 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2009-08-27 07:44:17 (GMT)
commit2d384efd8e85515c9f3e7ed628cc3fd57b044a00 (patch)
treecb46306925465f36d022c381b0cb0e8892b9188c /src
parent84ab1ebab17e62176db1120845d0a3ece5cf9d80 (diff)
downloadQt-2d384efd8e85515c9f3e7ed628cc3fd57b044a00.zip
Qt-2d384efd8e85515c9f3e7ed628cc3fd57b044a00.tar.gz
Qt-2d384efd8e85515c9f3e7ed628cc3fd57b044a00.tar.bz2
Revert "Fix setting the id property"
This reverts commit f51450571addf2cb9a55153b209b8c1a45898193. We apparently do not want to either make the id easily accessible or have a special case the turns things into strings. And the autotests are all broken anyways - fixing something only they use isn't important
Diffstat (limited to 'src')
-rw-r--r--src/declarative/qml/qmlcompiler.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp
index 764699e..070add7 100644
--- a/src/declarative/qml/qmlcompiler.cpp
+++ b/src/declarative/qml/qmlcompiler.cpp
@@ -1235,13 +1235,9 @@ bool QmlCompiler::buildProperty(QmlParser::Property *prop,
// default property or to sub-objects (which are always in binding
// sub-contexts)
COMPILE_CHECK(buildIdProperty(prop, obj));
- if (prop->type == QVariant::String){
- if(!prop->values.at(0)->value.isString()){
- //Need to convert to string to assign to the QString id property
- prop->values.at(0)->value = Variant(prop->values.at(0)->value.asString());
- }
+ if (prop->type == QVariant::String &&
+ prop->values.at(0)->value.isString())
COMPILE_CHECK(buildPropertyAssignment(prop, obj, ctxt));
- }
} else if (isAttachedPropertyName(prop->name)) {
@@ -1702,7 +1698,7 @@ bool QmlCompiler::buildListProperty(QmlParser::Property *prop,
// children: [ Item {}, Item {} ]
// }
//
-// We allow assigning multiple values to single value properties
+// We allow assignming multiple values to single value properties
bool QmlCompiler::buildPropertyAssignment(QmlParser::Property *prop,
QmlParser::Object *obj,
const BindingContext &ctxt)