diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2019-10-10 11:37:59 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2019-10-10 15:53:36 +0200 |
commit | 6fceeab1d15e1d6c1fa3d8e067f2acdeccb78e64 (patch) | |
tree | 112366fdd8d898d57cf3dd0fcb7d868b5b179d33 /examples | |
parent | cb9bfcd5c0a8bf541d3b67a80ca22ed11662b422 (diff) |
QML ListModel: Emit a warning when adding an object with undefined or null member
The current code in ListModel simply did a reset of an existing
property, in case a role existed and was set to null/undefined. If the
role did not exist, the code would simply skip over the member and do
nothing.
However, this does not make any sense for newly inserted items, and
most likely indicates a misunderstanding of how ListModel works.
Creating an undefined/null role does not really make sense, as those
could only ever store a undefined/null value.
Change-Id: I4c1361647a82146565eaffe064598c94c748b4f5
Task-number: QTBUG-63569
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'examples')
0 files changed, 0 insertions, 0 deletions