fuoco66
9th July 2011, 11:49
Hi everybody, some days ago i completed an app that could print all the contact of a device on the screen,and then call one of them.
But yersterday i add only a text box in the ui file, and from that moment the app doesn't work anymore. It works fine on the simulator(printing the name of the contact in the debug window, or in a label), but on the device it returns:
[Qt Message] ASSERT failure in QList<T>::operator[]: "index out of range", file C:/QtSDK/Symbian/SDKs/Symbian3Qt473/include/QtCore/qlist.h, line 464
Thread has crashed: Thread 0x876 has panicked. Category: ASSERT failure i; Reason: 0
Thread has crashed: Thread 0x877 has panicked. Category: ASSERT failure i; Reason: 0
this is the method i use:
void MainWindow::list_contact()
{
m_contactManager = new QContactManager("symbian");
QList<QContact> contacts = m_contactManager->contacts();
QContactName name = contacts[0].detail<QContactName>();
ui->label->setText("name: " + name.firstName() + " " + name.lastName());
}
Help?
But yersterday i add only a text box in the ui file, and from that moment the app doesn't work anymore. It works fine on the simulator(printing the name of the contact in the debug window, or in a label), but on the device it returns:
[Qt Message] ASSERT failure in QList<T>::operator[]: "index out of range", file C:/QtSDK/Symbian/SDKs/Symbian3Qt473/include/QtCore/qlist.h, line 464
Thread has crashed: Thread 0x876 has panicked. Category: ASSERT failure i; Reason: 0
Thread has crashed: Thread 0x877 has panicked. Category: ASSERT failure i; Reason: 0
this is the method i use:
void MainWindow::list_contact()
{
m_contactManager = new QContactManager("symbian");
QList<QContact> contacts = m_contactManager->contacts();
QContactName name = contacts[0].detail<QContactName>();
ui->label->setText("name: " + name.firstName() + " " + name.lastName());
}
Help?