feat(src/app/AsyncObjectBuilder): better code

This commit is contained in:
Ronan Abhamon 2017-03-27 15:14:14 +02:00
parent 4ba245d60d
commit 85ecac9c0a
2 changed files with 1 additions and 5 deletions

View file

@ -54,8 +54,6 @@ protected:
QQmlEngine::setObjectOwnership(object, QQmlEngine::CppOwnership);
object->setParent(m_builder);
m_builder->m_is_created = true;
// Call user decorator.
if (m_builder->m_decorator)
m_builder->m_decorator(object);

View file

@ -45,7 +45,7 @@ public:
QObject *getObject () const;
bool isCreated () const {
return m_is_created;
return !!m_object;
}
signals:
@ -61,8 +61,6 @@ private:
QObject *m_object = nullptr;
bool m_is_created = false;
#ifdef QT_DEBUG
bool m_block_creation = false;
#endif // ifdef QT_DEBUG