Don't abuse new to do a reinterpret_cast
authorLars Knoll <lars.knoll@digia.com>
Thu, 12 Jun 2014 08:52:32 +0000 (10:52 +0200)
committerSimon Hausmann <simon.hausmann@digia.com>
Sun, 24 Aug 2014 11:38:25 +0000 (13:38 +0200)
commitd41121119b97ed60e543eed4b8d308ad9d250682
treeedd6c02af5622f3ba462f1d809da76ed7cf339c0
parenta400d33e812528ea463161c84591ac895d6b1879
Don't abuse new to do a reinterpret_cast

Using new to do a reinterpret_cast is rather confusing.
Also protect the list model case against self-assignment
which could lead to memory corruption.

Change-Id: I10b81644d0004d4a50a5a74e5b8c58e27cbe6934
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/qml/types/qqmllistmodel.cpp