diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-08-26 09:43:33 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-08-26 09:51:56 +0200 |
commit | e9e6f70d355499d551a26960d236644f92ea38af (patch) | |
tree | 542840d4b3b8ff82d6fab38c9ad2615d3592b793 /src/qml/types/qqmllistmodel.cpp | |
parent | 916ced089f37d96ca8ef1cdb938791247bd44b72 (diff) | |
parent | eadc35f499edd25d5d1c5f803db1d61675c1cc2c (diff) |
Merge remote-tracking branch 'origin/5.3' into 5.4
Conflicts:
src/qml/qml/qqmlobjectcreator_p.h
Change-Id: I60858ddb46866a8fa1a8576bb05b412afeeb4e41
Diffstat (limited to 'src/qml/types/qqmllistmodel.cpp')
-rw-r--r-- | src/qml/types/qqmllistmodel.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qml/types/qqmllistmodel.cpp index 4fca11b511..25879972ca 100644 --- a/src/qml/types/qqmllistmodel.cpp +++ b/src/qml/types/qqmllistmodel.cpp @@ -802,7 +802,7 @@ int ListElement::setDoubleProperty(const ListLayout::Role &role, double d) if (role.type == ListLayout::Role::Number) { char *mem = getPropertyMemory(role); - double *value = new (mem) double; + double *value = reinterpret_cast<double *>(mem); bool changed = *value != d; *value = d; if (changed) @@ -818,7 +818,7 @@ int ListElement::setBoolProperty(const ListLayout::Role &role, bool b) if (role.type == ListLayout::Role::Bool) { char *mem = getPropertyMemory(role); - bool *value = new (mem) bool; + bool *value = reinterpret_cast<bool *>(mem); bool changed = *value != b; *value = b; if (changed) @@ -834,8 +834,8 @@ int ListElement::setListProperty(const ListLayout::Role &role, ListModel *m) if (role.type == ListLayout::Role::List) { char *mem = getPropertyMemory(role); - ListModel **value = new (mem) ListModel *; - if (*value) { + ListModel **value = reinterpret_cast<ListModel **>(mem); + if (*value && *value != m) { (*value)->destroy(); delete *value; } |