diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-10-08 01:06:34 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-10-08 01:06:34 (GMT) |
commit | 8480eb288990c44c9ab337f42898bc4ef6dc62f4 (patch) | |
tree | c6b81875d9da441b825e4a6ae6996105896526c1 /src/declarative | |
parent | 33245164dc62d27f88a8914d1112f3a4155fa174 (diff) | |
download | Qt-8480eb288990c44c9ab337f42898bc4ef6dc62f4.zip Qt-8480eb288990c44c9ab337f42898bc4ef6dc62f4.tar.gz Qt-8480eb288990c44c9ab337f42898bc4ef6dc62f4.tar.bz2 |
Don't allow multiple values to be assigned to a singular property
Task-number: QTBUG-14005
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/qml/qdeclarativecompiler.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index dc28e22..7a29f24 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -1932,6 +1932,9 @@ bool QDeclarativeCompiler::buildPropertyAssignment(QDeclarativeParser::Property { obj->addValueProperty(prop); + if (prop->values.count() > 1) + COMPILE_EXCEPTION(prop->values.at(0), tr( "Cannot assign multiple values to a singular property") ); + for (int ii = 0; ii < prop->values.count(); ++ii) { Value *v = prop->values.at(ii); if (v->object) { |