Compile fix.
authorMichael Brasser <michael.brasser@nokia.com>
Fri, 9 Sep 2011 00:42:05 +0000 (10:42 +1000)
committerQt by Nokia <qt-info@nokia.com>
Fri, 9 Sep 2011 02:38:40 +0000 (04:38 +0200)
Change-Id: Iac8fd75a805a7f62638275fe05123a13198d5260
Reviewed-on: http://codereview.qt-project.org/4489
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>

src/declarative/qml/qdeclarativepropertycache.cpp

index 05232d9..e35fa52 100644 (file)
@@ -375,7 +375,7 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb
             if (data->isSignal()) {
                 int length = methodName.length();
 
-                char str[length + 3];
+                QVarLengthArray<char, 128> str(length+3);
                 str[0] = 'o';
                 str[1] = 'n';
                 str[2] = toupper(signature[0]);
@@ -383,7 +383,7 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb
                     memcpy(&str[3], &signature[1], length - 1);
                 str[length + 2] = '\0';
 
-                QHashedString on(QString::fromLatin1(str));
+                QHashedString on(QString::fromLatin1(str.data()));
                 stringCache.insert(on, sigdata);
                 ++signalHandlerIndex;
             }