I am trying to retrieve contact list , the code is shown below
When execution comes within this function i face Segmentation fault and Error Displayed is Thread has crashed: A data abort exception has occurred accessing 0x0.
void MainWindow::viewDetails(QContactManager* cm )
QList<QContactLocalId> contacts = cm->contactIds();
for (it = contacts.begin(); it != contacts.end(); ++it)
QContact contact = cm->contact(*it);
qDebug() << "Name: " << contact.displayLabel();