Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mark objects from Component.createObject() as destructible
Change-Id: I00a1a2b5cca80c3e2ea097690cadf21581e1356d Task-number: QTBUG-20626 Reviewed-on: http://codereview.qt.nokia.com/2367 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
- Loading branch information
Aaron Kennedy
authored and
Qt by Nokia
committed
Jul 29, 2011
1 parent
8fed8bf
commit 0e68a62
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
tests/auto/declarative/qdeclarativeecmascript/data/dynamicDeletion.2.qml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import QtQuick 1.0 | ||
|
||
QtObject { | ||
id: root | ||
|
||
property QtObject objectProperty | ||
|
||
property Component c: Component { | ||
id: componentObject | ||
QtObject { | ||
} | ||
} | ||
|
||
function create() { | ||
objectProperty = c.createObject(root); | ||
} | ||
|
||
function destroy() { | ||
objectProperty.destroy(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters