aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickxmllistmodel/data
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 /tests/auto/quick/qquickxmllistmodel/data
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 'tests/auto/quick/qquickxmllistmodel/data')
-rw-r--r--tests/auto/quick/qquickxmllistmodel/data/proxyCrash.qml9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickxmllistmodel/data/proxyCrash.qml b/tests/auto/quick/qquickxmllistmodel/data/proxyCrash.qml
new file mode 100644
index 0000000000..c0c5a25e3c
--- /dev/null
+++ b/tests/auto/quick/qquickxmllistmodel/data/proxyCrash.qml
@@ -0,0 +1,9 @@
+import QtQuick 2.0
+import QtQuick.XmlListModel 2.0
+import SortFilterProxyModel 1.0
+
+SortFilterProxyModel {
+ source: XmlListModel {
+ XmlRole { }
+ }
+}