Add warning if defining a ListModel with no roles.
authorGlenn Watson <glenn.watson@nokia.com>
Mon, 25 Jun 2012 23:47:43 +0000 (09:47 +1000)
committerQt by Nokia <qt-info@nokia.com>
Tue, 26 Jun 2012 02:29:34 +0000 (04:29 +0200)
commit895ec534acb63eacd625e2f320cb266dbff3fdb3
tree694a151a3611b832cb68c133b2a18f0d57200785
parent9fd34288efdbb5c77d002408dd83bccbd654292f
Add warning if defining a ListModel with no roles.

When static ListElement types are declared, the role names are
inferred from them at compile time. If they are all empty, it's
not possible to add roles to the model, so warn the user of this
case.

Task-number: QTBUG-21438
Change-Id: Ib4ac30e160c44a5a57ebd1c49fccc2b3db5f0977
Reviewed-by: Bea Lam <bea.lam@nokia.com>
src/qml/qml/qquicklistmodel.cpp
tests/auto/qml/qquicklistmodel/tst_qquicklistmodel.cpp