QContactManager contact fetching broken on Symbian^3?
-
I'm experiencing something unexpected while fetching contacts from the default QContactManager for Symbian^3 on my N8. I may be doing something wrong but this feels like a bug. My code works as expected on Maemo.
First, I tried fetching asynchronously with QContactFetchRequest. On Maemo, I get the results I expect. On Symbian^3, the request reaches QContactAbstractRequest::FinishedState but its error() returns 3, which I interpret to be QContactManager::InvalidDetailError. This feels like "QTMOBILITY-109":http://bugreports.qt.nokia.com/browse/QTMOBILITY-109, which was closed April 19, 2010.
Next, I tried fetching synchronously. On Maemo, my QContactManager's contacts() method returns a QList<QContact> full of QCtontacts. On Symbian^3, I get an empty QList<QContact>.
I'm using QtCreator from the QtSDK-1.1. For Maemo, I use the built-in compiler. For Symbian^3, I use the remote compiler. I'm using up-to-date versions of all libraries, as far as I know.
I can post a little application that demonstrates the problem.
-
Hi David,
This is very, very strange. Invalid Detail Error should never be returned by an engine during a default fetch request (or any fetch request... if an unsupported filter is used, I believe it's supposed to return NotSupportedError, although I might be wrong about that).
How are you constructing the manager which you're performing the requests on? Explicitly via "new QContactManager("symbian")" or via default ctor? Do any operations work at all (saving, etc)? Is the list of detail definitions returned by the engine empty or are some definitions in existence? Does the sample phonebook application work as expected on the device?
Cheers,
Chris. -
[quote author="David Talmage" date="1305756551"]This feels like "QTMOBILITY-109":http://bugreports.qt.nokia.com/browse/QTMOBILITY-109, which was closed April 19, 2010[/quote]
Hi David,
Make sure that you are using qt mobility 1.1.3 (which is shipped with Qt SDK 1.1) and wrap your application with "Nokia smart installer":http://developer.qt.nokia.com/wiki/Nokia_Smart_Installer_for_Symbian (if you have not done it yet).
Best regards,
Leon -
[quote author="chriadam" date="1305760560"]
How are you constructing the manager which you're performing the requests on? Explicitly via "new QContactManager("symbian")" or via default ctor? Do any operations work at all (saving, etc)? Is the list of detail definitions returned by the engine empty or are some definitions in existence? Does the sample phonebook application work as expected on the device?
[/quote]I'm using the default constructor. In my header file, I have
@QContactManager cm;@
On my N8, cm.managerName() returns "symbian". That should be the name of the default one, right? The available QContactManagers are "symbian", "memory", "invalid", and "symbianism".
The QContactManager returns an empty QList.Whether I use the synchronous or asynchronous methods on the N8, the QContactManager always returns an empty QList.
I haven't tried the sample phone book application.
-
[quote author="leon.anavi" date="1305760803"]
[quote author="David Talmage" date="1305756551"]This feels like "QTMOBILITY-109":http://bugreports.qt.nokia.com/browse/QTMOBILITY-109, which was closed April 19, 2010[/quote]Make sure that you are using qt mobility 1.1.3 (which is shipped with Qt SDK 1.1) and wrap your application with "Nokia smart installer":http://developer.qt.nokia.com/wiki/Nokia_Smart_Installer_for_Symbian (if you have not done it yet).
[/quote]I tried your suggestion, Leon. I told the remote compiler to wrap my app in the smart installer. I hope I don't need a real signing key for that because I don't have one.
Using the smart installer didn't change anything. I still get an empty QList on Symbian^3.
-
Hi David,
This sounds like a problem with the SDK or with the engine implementation on Symbian^3 which only affects some specific hardware variant. Can you please file a bug on http://bugreports.qt.nokia.com and include all of the details (versions of everything, steps to reproduce, what you expected, what actually resulted) -- preferably including a very minimal example.
I've spoken to one of our QA engineers, and he said that the problem couldn't be reproduced using vanilla Mobility 1.1.3 packages on S^3 (although he didn't use the SDK version during testing, I believe) which suggests to me that it's either an SDK (packaging, etc) problem, or something that only affects certain device types. As such, the more information you can provide, the quicker the problem will be able to be identified and hopefully fixed.
Thanks,
Chris. -
I filed "QTMOBILITY-1647":http://bugreports.qt.nokia.com/browse/QTMOBILITY-1647
-
Hi David,
I've updated that bug report with some information. We were unable to reproduce the problem. Is it possible that the Symbian engine plugin isn't being found on your device (or its not loading properly), causing the backend to fall-back to the invalid engine, or something? I'm not sure how you could find that out, unfortunately (I'm no Symbian guru)... perhaps using http://labs.qt.nokia.com/2011/04/15/introducing-muxcons/ or something might give some output..? Sometimes not having enough Capabilities included in your .pro can cause plugin loading problems, too, I think.
If you have any more information which could help us track down this issue, please do respond to the bug report.
Cheers,
Chris. -
Thanks, Chris. I updated the bug report. In short, my N8 behaves as I described with three of the four contact managers: invalid, memory, and symbian. The fourth contact manager, symbiansim, has three contacts in it.
For capabilities, I have this in my .pro file:
symbian:TARGET.CAPABILITY += ReadUserData WriteUserData
I don't know why I need WriteUserData. I think I put that in as an experiment.
Is it possible that I did not install qt and qtmobility correctly? I transferred their .sis files to E:, then installed them to "C: Phone memory" using File Manager.
-
Here is the tentative verdict on "QTMOBILITY-1647":http://bugreports.qt.nokia.com/browse/QTMOBILITY-1647:
The Symbian^3 back end for contact management doesn't work if any of the contacts have an avatar that isn't a JPEG image. When a contact with a PNG avatar is transferred by Bluetooth to Symbian^3, the avatar is converted into a format that the Symbian^3 Contacts application can display but the contacts back end cannot process.
The bug was closed last week as "Cannot Reproduce" but there has been some discussion since then. I don't think it's over. I hope that someone on the Qt team can tell me who can fix it.