summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorChristopher Ham <christopher.ham@nokia.com>2011-01-27 08:04:38 (GMT)
committerChristopher Ham <christopher.ham@nokia.com>2011-01-27 08:04:38 (GMT)
commit44c2b8bc246640a011010fc30ebfdc90988ef626 (patch)
tree16af8e7cf9f2eb355814a781414b7cf7dcab0fe8 /src/declarative
parented742d3c46eca7584b6fcb20c2de941852613fb2 (diff)
downloadQt-44c2b8bc246640a011010fc30ebfdc90988ef626.zip
Qt-44c2b8bc246640a011010fc30ebfdc90988ef626.tar.gz
Qt-44c2b8bc246640a011010fc30ebfdc90988ef626.tar.bz2
Fix object check in createObject
The 'if' check for the value map was inverted. Spelling in warning was fixed. Task-number: QTBUG-13087 Reviewed-by: Bea Lam
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/qml/qdeclarativecomponent.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp
index bd6e2d8..b634a7a 100644
--- a/src/declarative/qml/qdeclarativecomponent.cpp
+++ b/src/declarative/qml/qdeclarativecomponent.cpp
@@ -665,8 +665,8 @@ QScriptValue QDeclarativeComponent::createObject(QObject* parent, const QScriptV
{
Q_D(QDeclarativeComponent);
- if (valuemap.isObject() && !valuemap.isArray()) {
- qmlInfo(this) << tr("creatObject: value is not an object");
+ if (!valuemap.isObject() || valuemap.isArray()) {
+ qmlInfo(this) << tr("createObject: value is not an object");
return QScriptValue(QScriptValue::NullValue);
}
return d->createObject(parent, valuemap);