PDA

View Full Version : qtMobility and symbian contacts



fuoco66
13th March 2011, 02:44
hi to everybody. I'm new to qt developing for symbian, but during the past 2 weeks i spent a lot of time to create an app to read contats on a symbian device. Finally today i reach my aim, but the app only works fine on the symbian simulator. On the device the app doesn't work, but it close after 1 second. I use the qtmobility class <qContact> and <qcontactmanager>.

Someone can help me? :)

Lykurg
13th March 2011, 06:28
Someone can help me?How could we if you don't show us what you are doing. Or post a backtrace of the crash, or, or, or.

fuoco66
13th March 2011, 11:32
I'm sorry but i published my firts post from my mobile.
So, in my mainwindow.cpp i use

void MainWindow::findnew()
{
m_contactManager = new QContactManager();
QList<QContact> contacts = m_contactManager->contacts();
qDebug() << contacts[0];
}

to get all fields from the first contact. On the simulator it works fine returning

QContact(QContactId("qtcontacts:memory:id=simulator", 2))
QContactDetail(name="DisplayLabel", key=7, "Label"=QVariant(QString, "Self Simulator") )
QContactDetail(name="Type", key=10, "Type"=QVariant(QString, "Contact") )
QContactDetail(name="Name", key=13, "CustomLabel"=QVariant(QString, "Self Simulator") , "FirstName"=QVariant(QString, "Self") , "LastName"=QVariant(QString, "Simulator") )
QContactDetail(name="EmailAddress", key=16, "EmailAddress"=QVariant(QString, "selfcontact@example.com") )
QContactDetail(name="PhoneNumber", key=19, "PhoneNumber"=QVariant(QString, "+44123456789") )
QContactDetail(name="Address", key=22, "Country"=QVariant(QString, "UK") , "Locality"=QVariant(QString, "Leister") , "Street"=QVariant(QString, "56 Edmonton Square") )
QContactDetail(name="Guid", key=25, "Guid"=QVariant(QString, "0") )
QContactDetail(name="Timestamp", key=28, "CreationTimestamp"=QVariant(QDateTime, QDateTime("dom 13. mar 12:21:09 2011") ) , "ModificationTimestamp"=QVariant(QDateTime, QDateTime("dom 13. mar 12:21:09 2011") ) )
C:\Users\Manu\qtPrj\paky-build-simulator\release\paky.exe exited with code 0


But on the device when i push the button to start the method the app crash saying:

Starting application...
Application running with pid 4744.
Process 4744, thread 4745 stopped at 0x8029b7e9: Thread 0x1289 has panicked. Category: CNTMODEL; Reason: 15
Finished.

Now, someone knows how to fix? :)

Lykurg
13th March 2011, 11:48
http://lmgtfy.com/?q=CNTMODEL+reason+15 first result is a post at forum nokia with a link to a bug report... I guess you are using mobility < 1.1.0

fuoco66
13th March 2011, 12:00
i've already search on google, and also tey to use the qt mobility 1.1.1, but nothing change.

fuoco66
14th March 2011, 00:25
I tried to update the qtmobility library...the app doesn't crash anymore, but it returns me this error:

[Qt Message] CActiveScheduler::RunIfReady() returned error: -1