forked from qt-creator/qt-creator
QmlPuppet: Remove redundant null validations
Change-Id: I909119533646e0b29724212f764eb2685b683044 Reviewed-by: Marco Bubke <marco.bubke@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
eca7fce452
commit
41fe19cdc7
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user