diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2011-10-05 18:15:03 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-06 07:55:45 +0200 |
commit | 6028d8ebceccc4edd7c31ba0d16773ae866336c3 (patch) | |
tree | 630de9c420b10b7f3b4146f2847962a878e915d4 /tests/auto/declarative/qdeclarativeincubator/testtypes.cpp | |
parent | 466fe00e80fe80c0babc7b895882926c0a34b785 (diff) |
Always delete object if incubator is cancelled
Change-Id: Iad04340bac9d1345069e540e6bf9dbf671ce9226
Reviewed-on: http://codereview.qt-project.org/6088
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Diffstat (limited to 'tests/auto/declarative/qdeclarativeincubator/testtypes.cpp')
-rw-r--r-- | tests/auto/declarative/qdeclarativeincubator/testtypes.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeincubator/testtypes.cpp b/tests/auto/declarative/qdeclarativeincubator/testtypes.cpp index c1f07acb76..3ff15a71af 100644 --- a/tests/auto/declarative/qdeclarativeincubator/testtypes.cpp +++ b/tests/auto/declarative/qdeclarativeincubator/testtypes.cpp @@ -58,7 +58,32 @@ void SelfRegisteringType::clearMe() m_me = 0; } +CompletionRegisteringType *CompletionRegisteringType::m_me = 0; +CompletionRegisteringType::CompletionRegisteringType() +{ +} + +void CompletionRegisteringType::classBegin() +{ +} + +void CompletionRegisteringType::componentComplete() +{ + m_me = this; +} + +CompletionRegisteringType *CompletionRegisteringType::me() +{ + return m_me; +} + +void CompletionRegisteringType::clearMe() +{ + m_me = 0; +} + void registerTypes() { qmlRegisterType<SelfRegisteringType>("Qt.test", 1,0, "SelfRegistering"); + qmlRegisterType<CompletionRegisteringType>("Qt.test", 1,0, "CompletionRegistering"); } |