QSGSimpleTextureNode: Fix ownership of QSGTexture
authorTobias Koenig <tobias.koenig@kdab.com>
Fri, 3 Jul 2015 08:55:35 +0000 (10:55 +0200)
committerTobias Koenig <tobias.koenig@kdab.com>
Fri, 3 Jul 2015 17:10:15 +0000 (17:10 +0000)
commiteeee9f1466ffaf17f81d635c2e43dca76ce5b021
treecb96f082237e9adb4290b428fcc36a8c6f9554a3
parent8b205fd05dcdc4a0e7ec6b25429f691a0a9099fe
QSGSimpleTextureNode: Fix ownership of QSGTexture

Make sure the QSGSimpleTextureNode deletes the old QSGTexture
if a new one is set via setTexture() and the ownsTexture flag
is true.

[ChangeLog][QtQuick][SceneGraph] QSGSimpleTextureNode will now delete
the currently set QSGTexture object, if a new QSGTexture is set and
the ownsTexture flag is on.

Change-Id: Iabfbccd390e16948d4575baf29e6c8b4a184a404
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
src/quick/scenegraph/util/qsgsimpletexturenode.cpp
tests/auto/quick/nodes/tst_nodestest.cpp