diff options
author | Charles Yin <charles.yin@nokia.com> | 2011-07-27 12:07:42 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-07-29 02:47:11 +0200 |
commit | ea0cb11dc547c3b8a03618d31e4f7a85304f8fe3 (patch) | |
tree | c6986bb75cbea530f0afe3678eb5a729234c00e8 /src | |
parent | 84af3721034d303eb427e9e815d9ec40ba625465 (diff) |
XmlListModel.status is Ready right after creation (should be Null)
And whenever both the source the xml properties are empty, the status
should be Null as well.
Change-Id: I62936d9389b524833422a871b596b99cc93cc734
Task-number:QTBUG-18724
Reviewed-by:Michael Brasser
Reviewed-on: http://codereview.qt.nokia.com/2231
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/util/qdeclarativexmllistmodel.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp index e12959620b..5b978f49d8 100644 --- a/src/declarative/util/qdeclarativexmllistmodel.cpp +++ b/src/declarative/util/qdeclarativexmllistmodel.cpp @@ -1018,7 +1018,10 @@ void QDeclarativeXmlListModel::queryCompleted(const QDeclarativeXmlQueryResult & d->size = result.size; d->data = result.data; d->keyRoleResultsCache = result.keyRoleResultsCache; - d->status = Ready; + if (d->src.isEmpty() && d->xml.isEmpty()) + d->status = Null; + else + d->status = Ready; d->errorString.clear(); d->queryId = -1; |