diff options
Diffstat (limited to 'src/core/changes/qcomponentaddedchange.cpp')
-rw-r--r-- | src/core/changes/qcomponentaddedchange.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/core/changes/qcomponentaddedchange.cpp b/src/core/changes/qcomponentaddedchange.cpp index e00c4ffab..41f7a2340 100644 --- a/src/core/changes/qcomponentaddedchange.cpp +++ b/src/core/changes/qcomponentaddedchange.cpp @@ -75,7 +75,7 @@ QComponentAddedChangePrivate::QComponentAddedChangePrivate(const QEntity *entity */ /*! - * Constructs a new QComponentAddedChange with with \a entity and \a component. + * Constructs a new QComponentAddedChange which will notify \a entity that \a component was added */ QComponentAddedChange::QComponentAddedChange(const QEntity *entity, const QComponent *component) @@ -84,6 +84,16 @@ QComponentAddedChange::QComponentAddedChange(const QEntity *entity, { } +/*! + * Constructs a new QComponentAddedChange which will notify \a component that it was added to \a entity + */ +QComponentAddedChange::QComponentAddedChange(const QComponent *component, + const QEntity *entity) + : QSceneChange(*new QComponentAddedChangePrivate(entity, component), + ComponentAdded, component->id()) +{ +} + QComponentAddedChange::~QComponentAddedChange() { } |