diff options
author | David Boddie <dboddie@trolltech.com> | 2010-08-09 18:55:51 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2010-08-09 18:55:51 (GMT) |
commit | 7f2540ad80f56ccb4d81b897d90581130e9b9e91 (patch) | |
tree | 1e1ff4c8f9846faddd58a8ff6d0810bdac7c6f20 /src/declarative/qml/qdeclarativecompiler.cpp | |
parent | f33359fb0c56fe88e0ae3c564b7847f90889eac2 (diff) | |
parent | 720f4ca0ec3b42a101ac24b2cf74cdc87d29eac9 (diff) | |
download | Qt-7f2540ad80f56ccb4d81b897d90581130e9b9e91.zip Qt-7f2540ad80f56ccb4d81b897d90581130e9b9e91.tar.gz Qt-7f2540ad80f56ccb4d81b897d90581130e9b9e91.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7
Conflicts:
doc/src/declarative/declarativeui.qdoc
doc/src/getting-started/gettingstartedqml.qdoc
Diffstat (limited to 'src/declarative/qml/qdeclarativecompiler.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativecompiler.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index ba757fc..2b4a4a5 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -2215,10 +2215,11 @@ bool QDeclarativeCompiler::checkDynamicMeta(QDeclarativeParser::Object *obj) if (propNames.contains(prop.name)) COMPILE_EXCEPTION(&prop, tr("Duplicate property name")); - if (QString::fromUtf8(prop.name).at(0).isUpper()) + QString propName = QString::fromUtf8(prop.name); + if (propName.at(0).isUpper()) COMPILE_EXCEPTION(&prop, tr("Property names cannot begin with an upper case letter")); - if (QDeclarativeEnginePrivate::get(engine)->globalClass->illegalNames().contains(prop.name)) + if (QDeclarativeEnginePrivate::get(engine)->globalClass->illegalNames().contains(propName)) COMPILE_EXCEPTION(&prop, tr("Illegal property name")); propNames.insert(prop.name); @@ -2228,9 +2229,10 @@ bool QDeclarativeCompiler::checkDynamicMeta(QDeclarativeParser::Object *obj) QByteArray name = obj->dynamicSignals.at(ii).name; if (methodNames.contains(name)) COMPILE_EXCEPTION(obj, tr("Duplicate signal name")); - if (QString::fromUtf8(name).at(0).isUpper()) + QString nameStr = QString::fromUtf8(name); + if (nameStr.at(0).isUpper()) COMPILE_EXCEPTION(obj, tr("Signal names cannot begin with an upper case letter")); - if (QDeclarativeEnginePrivate::get(engine)->globalClass->illegalNames().contains(name)) + if (QDeclarativeEnginePrivate::get(engine)->globalClass->illegalNames().contains(nameStr)) COMPILE_EXCEPTION(obj, tr("Illegal signal name")); methodNames.insert(name); } @@ -2238,9 +2240,10 @@ bool QDeclarativeCompiler::checkDynamicMeta(QDeclarativeParser::Object *obj) QByteArray name = obj->dynamicSlots.at(ii).name; if (methodNames.contains(name)) COMPILE_EXCEPTION(obj, tr("Duplicate method name")); - if (QString::fromUtf8(name).at(0).isUpper()) + QString nameStr = QString::fromUtf8(name); + if (nameStr.at(0).isUpper()) COMPILE_EXCEPTION(obj, tr("Method names cannot begin with an upper case letter")); - if (QDeclarativeEnginePrivate::get(engine)->globalClass->illegalNames().contains(name)) + if (QDeclarativeEnginePrivate::get(engine)->globalClass->illegalNames().contains(nameStr)) COMPILE_EXCEPTION(obj, tr("Illegal method name")); methodNames.insert(name); } |