Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
1.2.x
-
None
-
Linux desktop
Description
The qmlcontacts application crashes on startup (see attached backtrace), when run on a Linux desktop machine with the "memory" backend. The problem seems to be caused by early binding of the ListView.model property to ContactModel, delaying this binding prevents the crash. The following code is a minimal example, you will need the example.vcf file from the qmlcontacts demo (demos/qmlcontacts/content/example.vcf).
import QtQuick 1.1 import QtMobility.contacts 1.1 Rectangle { width: 360 height: 360 ListView { anchors.fill: parent model: contactModel delegate: Text { text: contact.name.firstName + " " + contact.name.lastName } ContactModel { id: contactModel Component.onCompleted: { if (manager == "memory") importContacts(Qt.resolvedUrl("example.vcf")); } } } }