Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.0.1
-
None
-
Linux x86_64
-
9b25a6f39ee59fe1bb4352a5f2e4ef4a91f1f2c3
Description
The following QML app crashes after you click somewhere:
import QtQuick 2.0
Rectangle {
ListModel {
id: model
ListElement { }
}
ListView {
id: list
model: model
delegate: Item {
}
}
MouseArea {
anchors.fill: parent
onClicked:
}
}
After the model operation the currentItem should be null (as there are no items left). But the change is pending and executed when accessing the currentItem property. An error in QQuickItemView::currentItem() leads to a crash.
The same behaviour does not occur in QtQuick1.
I attached a patch against Qt 5.0.1 which works for me.