diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2017-05-03 14:30:05 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2017-05-04 14:02:26 +0000 |
commit | 66724f59910a87f924f0fd7d9954ced9413676b1 (patch) | |
tree | 33952f67bf17745a72dc487449be8b159c2cb53b /src | |
parent | 0b403a9e3f81b63855e7285f5f7ec6bb497beb2e (diff) |
Add missing break
Commit 2a812493bc97983b85110f853d3dbe57b54667d8 added the VariantMap
case but forgot to add the break before it (there wasn't a break because
it fell through to default: break).
This is a 6.5 year old issue, though it affected no one because
setVariantMapProperty checks the destination's type again. Found by
GCC 7:
qqmllistmodel.cpp:1075:62: warning: this statement may fall through [-Wimplicit-fallthrough=]
target->setVariantProperty(targetRole, v);
^
qqmllistmodel.cpp:1077:13: note: here
case ListLayout::Role::VariantMap:
^~~~
Change-Id: Ica9894dc9b5e48278fd4fffd14bb35efd18a8a6e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/types/qqmllistmodel.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qml/types/qqmllistmodel.cpp index 2011fcc4d6..4d8f213284 100644 --- a/src/qml/types/qqmllistmodel.cpp +++ b/src/qml/types/qqmllistmodel.cpp @@ -1071,6 +1071,7 @@ void ListElement::sync(ListElement *src, ListLayout *srcLayout, ListElement *tar QVariant v = src->getProperty(srcRole, 0, 0); target->setVariantProperty(targetRole, v); } + break; case ListLayout::Role::VariantMap: { QVariantMap *map = src->getVariantMapProperty(srcRole); |