diff options
author | Liang Qi <liang.qi@qt.io> | 2016-06-10 10:06:39 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-06-10 10:06:39 +0200 |
commit | 0932a59971f606f07b41da19f3974d51b7008180 (patch) | |
tree | 191aab5e88e7b4ddf3724dcbf3b8229512e433f2 /tests/auto/qml/qqmllistmodel | |
parent | aca40a8361996e22ec4f020b803404031a0f0d76 (diff) | |
parent | cd0efef04bd45eca6cc72b5a000e4e5586153290 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Part of 0e053528 was reverted in the merge, about lastTimestamp. It
will be applied later in separate commit.
qmltest::shadersource-dynamic-sourceobject::test_endresult() was
blacklisted on linux.
Conflicts:
.qmake.conf
tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
tests/auto/qmltest/BLACKLIST
tests/auto/qmltest/qmltest.pro
Task-number: QTBUG-53590
Task-number: QTBUG-53971
Change-Id: I48af90b49a3c7b29de16f4178a04807f8bc05130
Diffstat (limited to 'tests/auto/qml/qqmllistmodel')
-rw-r--r-- | tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp b/tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp index b3d199f80f..cd497cbd79 100644 --- a/tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp +++ b/tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp @@ -105,6 +105,7 @@ private slots: void get_nested(); void get_nested_data(); void crash_model_with_multiple_roles(); + void crash_model_with_unknown_roles(); void set_model_cache(); void property_changes(); void property_changes_data(); @@ -963,6 +964,21 @@ void tst_qqmllistmodel::crash_model_with_multiple_roles() delete rootItem; } +void tst_qqmllistmodel::crash_model_with_unknown_roles() +{ + QQmlEngine eng; + QQmlComponent component(&eng, testFileUrl("multipleroles.qml")); + QScopedPointer<QObject> rootItem(component.create()); + QVERIFY(component.errorString().isEmpty()); + QVERIFY(rootItem != 0); + QQmlListModel *model = rootItem->findChild<QQmlListModel*>("listModel"); + QVERIFY(model != 0); + + // used to cause a crash in debug builds + model->index(0, 0, QModelIndex()).data(Qt::DisplayRole); + model->index(0, 0, QModelIndex()).data(Qt::UserRole); +} + //QTBUG-15190 void tst_qqmllistmodel::set_model_cache() { |