From ef353b5754e81923358d030760cabd193a2cb248 Mon Sep 17 00:00:00 2001 From: Aaron Kennedy Date: Fri, 17 Jul 2009 16:56:03 +1000 Subject: Add NOTIFY for count signal --- src/declarative/extra/qmlxmllistmodel.cpp | 1 + src/declarative/extra/qmlxmllistmodel.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/declarative/extra/qmlxmllistmodel.cpp b/src/declarative/extra/qmlxmllistmodel.cpp index e154268..7f0029d 100644 --- a/src/declarative/extra/qmlxmllistmodel.cpp +++ b/src/declarative/extra/qmlxmllistmodel.cpp @@ -645,6 +645,7 @@ void QmlXmlListModel::queryCompleted(int id, int size) if (size > 0) { d->data = d->qmlXmlQuery.modelData(); emit itemsInserted(0, d->size); + emit countChanged(); } } diff --git a/src/declarative/extra/qmlxmllistmodel.h b/src/declarative/extra/qmlxmllistmodel.h index d9871ab..3b6ffb4 100644 --- a/src/declarative/extra/qmlxmllistmodel.h +++ b/src/declarative/extra/qmlxmllistmodel.h @@ -98,6 +98,7 @@ class Q_DECLARATIVE_EXPORT QmlXmlListModel : public QListModelInterface, public Q_PROPERTY(QString query READ query WRITE setQuery) Q_PROPERTY(QString namespaceDeclarations READ namespaceDeclarations WRITE setNamespaceDeclarations) Q_PROPERTY(QmlList *roles READ roleObjects) + Q_PROPERTY(int count READ count NOTIFY countChanged) Q_CLASSINFO("DefaultProperty", "roles") public: @@ -130,6 +131,7 @@ public: signals: void statusChanged(Status); void progressChanged(qreal progress); + void countChanged(); public Q_SLOTS: void reload(); -- cgit v0.12