aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-06-10 10:06:39 +0200
committerLiang Qi <liang.qi@qt.io>2016-06-10 10:06:39 +0200
commit0932a59971f606f07b41da19f3974d51b7008180 (patch)
tree191aab5e88e7b4ddf3724dcbf3b8229512e433f2 /src/qml/types
parentaca40a8361996e22ec4f020b803404031a0f0d76 (diff)
parentcd0efef04bd45eca6cc72b5a000e4e5586153290 (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 'src/qml/types')
-rw-r--r--src/qml/types/qqmllistmodel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qml/types/qqmllistmodel.cpp
index 44a4ff03e9..1e1ebc4939 100644
--- a/src/qml/types/qqmllistmodel.cpp
+++ b/src/qml/types/qqmllistmodel.cpp
@@ -396,6 +396,8 @@ void ListModel::updateCacheIndices()
QVariant ListModel::getProperty(int elementIndex, int roleIndex, const QQmlListModel *owner, QV4::ExecutionEngine *eng)
{
+ if (roleIndex >= m_layout->roleCount())
+ return QVariant();
ListElement *e = elements[elementIndex];
const ListLayout::Role &r = m_layout->getExistingRole(roleIndex);
return e->getProperty(r, owner, eng);