aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/xmllistmodel
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@digia.com>2014-04-09 16:00:49 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-10 09:19:55 +0200
commit7254e09442278f9e083a423c832c24b58e8fedec (patch)
tree923e2e060581c609f269e09ef0cfcb17642ee4d9 /src/imports/xmllistmodel
parent1eace58364d8abf89e08686396d7e34b140a0aa5 (diff)
Fix the initial value of XmlListModel::count
QAbstractItemModel::rowCount() should under no circumstances return -1 or it will crash QSortFilterProxyModel. Change-Id: Ib3d4a57d5fc3761a7fc6f6925c3d25bdea20ce78 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/imports/xmllistmodel')
-rw-r--r--src/imports/xmllistmodel/qqmlxmllistmodel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp
index 3c6967fd69..d5be42c06d 100644
--- a/src/imports/xmllistmodel/qqmlxmllistmodel.cpp
+++ b/src/imports/xmllistmodel/qqmlxmllistmodel.cpp
@@ -543,7 +543,7 @@ class QQuickXmlListModelPrivate : public QAbstractItemModelPrivate
Q_DECLARE_PUBLIC(QQuickXmlListModel)
public:
QQuickXmlListModelPrivate()
- : isComponentComplete(true), size(-1), highestRole(Qt::UserRole)
+ : isComponentComplete(true), size(0), highestRole(Qt::UserRole)
, reply(0), status(QQuickXmlListModel::Null), progress(0.0)
, queryId(-1), roleObjects(), redirectCount(0) {}