Commit 41fe19cd authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

QmlPuppet: Remove redundant null validations



Change-Id: I909119533646e0b29724212f764eb2685b683044
Reviewed-by: default avatarMarco Bubke <marco.bubke@digia.com>
parent eca7fce4
......@@ -947,8 +947,7 @@ QObject *ObjectNodeInstance::createComponentWrap(const QString &nodeSource, cons
QObject *object = component;
tweakObjects(object);
if (object && context)
QQmlEngine::setContextForObject(object, context);
QQmlEngine::setContextForObject(object, context);
QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership);
......@@ -1143,7 +1142,7 @@ QObject *ObjectNodeInstance::createPrimitive(const QString &typeName, int majorN
tweakObjects(object);
if (object && context)
if (object)
QQmlEngine::setContextForObject(object, context);
QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership);
......
......@@ -892,8 +892,7 @@ QObject *ObjectNodeInstance::createComponentWrap(const QString &nodeSource, cons
QObject *object = component;
tweakObjects(object);
if (object && context)
QDeclarativeEngine::setContextForObject(object, context);
QDeclarativeEngine::setContextForObject(object, context);
QDeclarativeEngine::setObjectOwnership(object, QDeclarativeEngine::CppOwnership);
......@@ -989,7 +988,7 @@ QObject *ObjectNodeInstance::createPrimitive(const QString &typeName, int majorN
tweakObjects(object);
if (object && context)
if (object)
QDeclarativeEngine::setContextForObject(object, context);
QDeclarativeEngine::setObjectOwnership(object, QDeclarativeEngine::CppOwnership);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment