From 136b4627e213c9fa4ec0de1bce6baf6fba38f0cc Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 9 Sep 2011 10:42:05 +1000 Subject: [PATCH] Compile fix. Change-Id: Iac8fd75a805a7f62638275fe05123a13198d5260 Reviewed-on: http://codereview.qt-project.org/4489 Reviewed-by: Qt Sanity Bot Reviewed-by: Martin Jones --- src/declarative/qml/qdeclarativepropertycache.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/declarative/qml/qdeclarativepropertycache.cpp b/src/declarative/qml/qdeclarativepropertycache.cpp index 05232d9..e35fa52 100644 --- a/src/declarative/qml/qdeclarativepropertycache.cpp +++ b/src/declarative/qml/qdeclarativepropertycache.cpp @@ -375,7 +375,7 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb if (data->isSignal()) { int length = methodName.length(); - char str[length + 3]; + QVarLengthArray 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; } -- 1.7.2.5