Uploaded image for project: 'Qt Mobility'
  1. Qt Mobility
  2. QTMOBILITY-1697

ContactModel crashes on startup

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • None
    • 1.2.x
    • Contacts
    • None
    • Linux desktop

      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"));
                  }
              }
          }
      }
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            satu.m.makela satu makela
            amccarth Aaron McCarthy (closed Nokia identity) (Inactive)
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes