diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-30 17:22:24 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-30 17:22:24 (GMT) |
commit | a6f4b0bbcf7f75bb5e615da1911c26bea2c95be3 (patch) | |
tree | e14f1bac9f4a1737c034b0922ff21550d36dc8ad /src/declarative/util/qdeclarativelistmodel.cpp | |
parent | 95ecd7dcbf9ca26d35011b54cce04d56d4d1b843 (diff) | |
parent | ed82b3d0f93b9876201aa8145eafbaf4b50f2f36 (diff) | |
download | Qt-a6f4b0bbcf7f75bb5e615da1911c26bea2c95be3.zip Qt-a6f4b0bbcf7f75bb5e615da1911c26bea2c95be3.tar.gz Qt-a6f4b0bbcf7f75bb5e615da1911c26bea2c95be3.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (61 commits)
Added SET_BINDING message to QDeclarative debugger protocol
Add ListView.nextSection attached property
Remove the old font.outline documentation
Docs - add more links to relevant examples
Rewrite runtime & qmlviewer docs and emphasise that qmlviewer shouldn't
Indicate default sizing option in qmlviewer
Plug QdeclarativePixmapCache canceled request leak.
update qml.qch to version 4.7
Undefined is undefined, and now qml warns about it
Fix so window will resize with the root object (broken by
Avoid duplicate code for testing initial sizes
Remove an unnecessary connect() in TextInput
Ensure micro focus is updated in TextEdit and TextInput
Fix flow layout not taking into account whether it's width and height are implicit or not.
Avoid binding loop.
Ensure Loader item change listener is removed when Loader is destroyed
Adapt all qmlviewer testcases to the code changes in the actual viewer.
Stop QMLLauncher from crashing on exit on Mac when quitting app via the
VisualDataModel hasModelChildren role shadowed user roles.
Allow positioning of ListView items width sub-pixel precision.
...
Diffstat (limited to 'src/declarative/util/qdeclarativelistmodel.cpp')
-rw-r--r-- | src/declarative/util/qdeclarativelistmodel.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index 9ed21a6..deb835d 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -551,9 +551,13 @@ bool QDeclarativeListModelParser::compileProperty(const QDeclarativeCustomParser QDeclarativeCustomParserNode node = qvariant_cast<QDeclarativeCustomParserNode>(value); - if (node.name() != "ListElement") { - error(node, QDeclarativeListModel::tr("ListElement: cannot contain nested elements")); - return false; + if (node.name() != listElementTypeName) { + const QMetaObject *mo = resolveType(node.name()); + if (mo != &QDeclarativeListElement::staticMetaObject) { + error(node, QDeclarativeListModel::tr("ListElement: cannot contain nested elements")); + return false; + } + listElementTypeName = node.name(); // cache right name for next time } { @@ -650,6 +654,7 @@ QByteArray QDeclarativeListModelParser::compile(const QList<QDeclarativeCustomPa { QList<ListInstruction> instr; QByteArray data; + listElementTypeName = QByteArray(); // unknown for(int ii = 0; ii < customProps.count(); ++ii) { const QDeclarativeCustomParserProperty &prop = customProps.at(ii); |