aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2011-07-15 18:08:51 +1000
committerQt by Nokia <qt-info@nokia.com>2011-08-30 13:18:28 +0200
commit9598e3da45b18832b7f320e82cec6ded062339c0 (patch)
tree4939ec33549b28f148bca53292d9a9dab0f79f94 /src
parentc742d2d12122e752a74da3e3f26dff28ff967b9d (diff)
Remove unnecessary toString()
Change-Id: I0c39bf9c96d65ba1ed4faffffebfd9b89016b3d7 Reviewed-on: http://codereview.qt.nokia.com/3751 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Diffstat (limited to 'src')
-rw-r--r--src/declarative/qml/qdeclarativecompiler.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp
index 29f8845638..708f2bce55 100644
--- a/src/declarative/qml/qdeclarativecompiler.cpp
+++ b/src/declarative/qml/qdeclarativecompiler.cpp
@@ -1415,9 +1415,9 @@ bool QDeclarativeCompiler::buildSignal(QDeclarativeParser::Property *prop, QDecl
{
Q_ASSERT(obj->metaObject());
- QString name = prop->name().toString();
- Q_ASSERT(name.startsWith(on_string));
- name = name.mid(2);
+ QStringRef propName = prop->name();
+ Q_ASSERT(propName.startsWith(on_string));
+ QString name = propName.string()->mid(propName.position() + 2, propName.length() - 2);
// Note that the property name could start with any alpha or '_' or '$' character,
// so we need to do the lower-casing of the first alpha character.
@@ -1433,7 +1433,7 @@ bool QDeclarativeCompiler::buildSignal(QDeclarativeParser::Property *prop, QDecl
if (sigIdx == -1) {
- if (notInRevision && -1 == indexOfProperty(obj, prop->name(), 0)) {
+ if (notInRevision && -1 == indexOfProperty(obj, propName, 0)) {
Q_ASSERT(obj->type != -1);
const QList<QDeclarativeTypeData::TypeReference> &resolvedTypes = unit->resolvedTypes();
const QDeclarativeTypeData::TypeReference &type = resolvedTypes.at(obj->type);