diff options
author | David Boddie <dboddie@trolltech.com> | 2010-08-27 16:32:49 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2010-08-27 16:32:49 (GMT) |
commit | 3ca305cf25033477b73121aa6622f8c9115285ec (patch) | |
tree | 59edd09384ffca0b5e68a777a032a9aa3f65a9df /src/declarative/util/qdeclarativelistmodel.cpp | |
parent | 2cac8ca88c9b5b2f9d3040b1543d88ecee52da99 (diff) | |
parent | d3b898e973662707f9644b4fe5f8d18849929723 (diff) | |
download | Qt-3ca305cf25033477b73121aa6622f8c9115285ec.zip Qt-3ca305cf25033477b73121aa6622f8c9115285ec.tar.gz Qt-3ca305cf25033477b73121aa6622f8c9115285ec.tar.bz2 |
Merge branch '4.7' into qmldocs
Diffstat (limited to 'src/declarative/util/qdeclarativelistmodel.cpp')
-rw-r--r-- | src/declarative/util/qdeclarativelistmodel.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index 8f9b725..60d8aa9 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -58,9 +58,6 @@ Q_DECLARE_METATYPE(QListModelInterface *) QT_BEGIN_NAMESPACE -#define DATA_ROLE_ID 1 -#define DATA_ROLE_NAME "data" - QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListModelData::instructions() const { return (QDeclarativeListModelParser::ListInstruction *)((char *)this + sizeof(ListModelData)); @@ -570,7 +567,7 @@ bool QDeclarativeListModelParser::compileProperty(const QDeclarativeCustomParser QList<QDeclarativeCustomParserProperty> props = node.properties(); for(int jj = 0; jj < props.count(); ++jj) { const QDeclarativeCustomParserProperty &nodeProp = props.at(jj); - if (nodeProp.name() == "") { + if (nodeProp.name().isEmpty()) { error(nodeProp, QDeclarativeListModel::tr("ListElement: cannot contain nested elements")); return false; } @@ -658,7 +655,7 @@ QByteArray QDeclarativeListModelParser::compile(const QList<QDeclarativeCustomPa for(int ii = 0; ii < customProps.count(); ++ii) { const QDeclarativeCustomParserProperty &prop = customProps.at(ii); - if(prop.name() != "") { // isn't default property + if(!prop.name().isEmpty()) { // isn't default property error(prop, QDeclarativeListModel::tr("ListModel: undefined property '%1'").arg(QString::fromUtf8(prop.name()))); return QByteArray(); } |