From 44c2b8bc246640a011010fc30ebfdc90988ef626 Mon Sep 17 00:00:00 2001 From: Christopher Ham Date: Thu, 27 Jan 2011 18:04:38 +1000 Subject: 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 --- src/declarative/qml/qdeclarativecomponent.cpp | 4 ++-- 1 file 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); -- cgit v0.12