×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Registered User
    Join Date
    Apr 2012
    Posts
    6

    For creation of instance of the class QMessageService takes a lot of time. N9 PR1.2

    Hello.
    I have a problem.
    For creation of instance of the class QMessageService takes a lot of time.
    Then execute:
    Code:
    new QMessageService();
    The application is frozen. Through some continuous time (about 10 seconds) I take message to the debug console:
    Code:
    "GDBus.Error:org.freedesktop.Tracker1.SparqlError.Internal: Operation was cancelled" 
    QTrackerDirectSelectResult: QSparqlError(6, "GDBus.Error:org.freedesktop.Tracker1.SparqlError.Internal: Operation was cancelled", 4) "SELECT ?message rdf:type(?message) nmo:sentDate(?message) nmo:receivedDate(?message) nmo:isSent(?message) nmo:isDraft(?message) nmo:isRead(?message) nmo:isAnswered(?message) nmo:isEmergency(?message) nmo:deliveryStatus(?message) nie:contentSize(?message) (SELECT GROUP_CONCAT(tracker:coalesce(nco:imID(?medium), nco:phoneNumber(?medium), ?medium), "\u001e") WHERE { ?from nco:hasContactMedium ?medium . }) (SELECT GROUP_CONCAT(tracker:coalesce(nco:imID(?medium), nco:phoneNumber(?medium), ?medium), "\u001e") WHERE { ?to nco:hasContactMedium ?medium . })   (SELECT GROUP_CONCAT(    fn:concat(tracker:id(?contact), "\u001e",               tracker:coalesce(nco:nameGiven(?contact), ""), "\u001e",               tracker:coalesce(nco:nameFamily(?contact), ""),               "\u001d",              tracker:coalesce(nco:nickname(?contact), ""),              "\u001d",              tracker:coalesce(?nicknames, "")),     "\u001c") WHERE {  SELECT ?contact   (SELECT GROUP_CONCAT(fn:string-join((nco:imID(?addr), ?nickname), "\u001f"), "\u001e")  WHERE {    ?contact nco:hasAffiliation [ nco:hasIMAddress ?addr ] .     ?addr nco:imNickname ?nickname .   }) AS ?nicknames   WHERE {  {    ?target nco:hasIMAddress ?address .     ?contact nco:hasAffiliation [ nco:hasIMAddress ?address ] .   } UNION {    ?target nco:hasPhoneNumber [ maemo:localPhoneNumber ?number ] .     ?contact nco:hasAffiliation [ nco:hasPhoneNumber [ maemo:localPhoneNumber ?number ] ] .   }}}) AS ?contacts  rdf:nil nmo:phoneMessageId(?message) nmo:messageSubject(?message) nie:plainTextContent(?message) nmo:communicationChannel(?message) nmo:messageId(?message) nie:contentLastModified(?message) nfo:fileName(nmo:fromVCard(?message)) rdfs:label(nmo:fromVCard(?message)) nmo:encoding(?message) nie:characterSet(?message) nie:language(?message) nmo:isDeleted(?message) nmo:reportDelivery(?message) nmo:validityPeriod(?message) nie:generator(?message) (SELECT GROUP_CONCAT(?cc, '\u001e') {?message nmo:cc ?ccContact . {?ccContact nco:hasIMAddress [nco:imID ?cc]}UNION{?ccContact nco:hasPhoneNumber [nco:phoneNumber ?cc]}}) (SELECT GROUP_CONCAT(?bcc, '\u001e') {?message nmo:bcc ?bccContact . {?bccContact nco:hasIMAddress [nco:imID ?bcc]}UNION{?bccContact nco:hasPhoneNumber [nco:phoneNumber ?bcc]}}) nmo:reportReadStatus(?message) nmo:sentWithReportRead(?message) nmo:mustAnswerReportRead(?message) nmo:mmsId(?message) nmo:isAnswered(?message) (SELECT GROUP_CONCAT(fn:string-join((nmo:headerName(?header), nmo:headerValue(?header)), "\u001d"), "\u001f") WHERE { ?message nmo:messageHeader ?header }) WHERE { SELECT ?message ?from ?to  IF (nmo:isSent(?message) = true, ?to, ?from) AS ?target  ?message WHERE {?message nmo:from ?from ; nmo:to ?to .  ?message rdf:type nmo:SMSMessage . } }"
    After that I can use object. But this very long time for waiting.
    Where I was mistaken? And how to accelerate this process?

    Problem on N9 PR1.2

    P.S. Sorry for my English.

  2. #2
    Registered User
    Join Date
    Sep 2011
    Posts
    449

    Re: For creation of instance of the class QMessageService takes a lot of time. N9 PR1

    Hi,

    Can you be a bit more specific on your usecase, we have run examples using QMesssageService to send sms and we did not face these kind of delays.
    Can you please paste a small piece of code, esp, that would have triggered the tracker query.

  3. #3
    Registered User
    Join Date
    Apr 2012
    Posts
    6

    Re: For creation of instance of the class QMessageService takes a lot of time. N9 PR1

    I base my code on http://harmattan-dev.nokia.com/docs/.../api-showcase/.
    In this example QMessageService used for send SMS.
    But I use it for compose SMS and then open built in SMS editor.
    Code:
    /*!
     * INCLUDES
     */
    #include "messenger.h"
    #include <QDebug>
    #include <QContactManager>
    #include <QContactPhoneNumber>
    #include <QContactName>
    #include <QContactNickname>
    
    QTM_USE_NAMESPACE
    
    /*!
     * Constructor method for the class Messenger
     */
    Messenger::Messenger(QObject *parent) :
        QObject(parent),
        m_pMessageService(NULL),
        m_networkInfo(NULL)
    {
    
    }
    
    /*!
     * Destructor
     */
    Messenger::~Messenger()
    {
        //! Check if m_networkInfo is valid
        if (m_networkInfo != NULL)
            delete m_networkInfo;
    
        //! Check if m_pMS is valid
        if (m_pMessageService != NULL)
            delete m_pMessageService;
    }
    
    /*!
     * Called from QML code to initialize message service
     */
    void Messenger::initialiseMessageService()
    {
        m_pMessageService = new QMessageService(this);                       //Problem is here
    
        //! Check for validity of m_pMS
        Q_ASSERT(m_pMessageService);
    
        //! Initialize the SMS state to False
        m_smsState = false;
    
        //! Connect with the QMessageService and initialize the QMessageService
        connect(m_pMessageService,SIGNAL(stateChanged(QMessageService::State)),
                this,SLOT(currentState(QMessageService::State)));
    }
    
    /*!
     * Called from QML code with messageText content as
     * argument inorder to compose the SMS
     */
    bool Messenger::composeSMS(const QString &text)
    {    
        bool ret = false;
    
        //! Verify the send number and the text
        if (m_pMessageService && to.size() && text.size()) {
            QMessage m;
            m.setType(QMessage::Sms);
            m.setBody(text);
    
            ret = m_pMessageService->compose(m);
        }
    
        return ret;
    }

  4. #4
    Registered User
    Join Date
    Sep 2011
    Posts
    449

    Re: For creation of instance of the class QMessageService takes a lot of time. N9 PR1

    Hi,

    The code on seeing looked fine to me.

    I tested the code, i didnt find any delay
    How does the actual app (showcase app) behave for you?
    I tried calling compose from the same app and it worked fine too.

  5. #5
    Registered User
    Join Date
    Apr 2012
    Posts
    6

    Re: For creation of instance of the class QMessageService takes a lot of time. N9 PR1

    Hi.

    Many thanks for the response!
    It is good news to me since it is similar that a problem not in a code
    The compiled example also gave a time delay. Also I tried to install ready deb. The time delay was present and by its operation too. It means a problem can be in my N9.
    I will try re-flash it or reset to factory settings. And again to launch an example.

  6. #6
    Registered User
    Join Date
    Sep 2011
    Posts
    449

    Re: For creation of instance of the class QMessageService takes a lot of time. N9 PR1

    Hi,

    But seems there is some problem, there is one more person complaining the same here, Did you already have a look at that?

  7. #7
    Registered User
    Join Date
    Apr 2012
    Posts
    6

    Re: For creation of instance of the class QMessageService takes a lot of time. N9 PR1

    Hi.
    Thanks, I yet didn't see this link. I had the same problem.
    I tried to solve it.
    1) switched off additional accounts (Nokia, Skype, FaceBook, Google, Twitter) .
    2) deleted contacts.
    3) cleared the device.
    Only the third step helped. Now I don't watch time delays when I call constructor of QMessageService.

    Probably, the problem was because I updated N9 firmware from the PR1.0 version to PR1.2 without device cleaning. Though in these firmwares there are differences by operation with contacts.

  8. #8
    Registered User
    Join Date
    Jun 2007
    Posts
    11

    Re: For creation of instance of the class QMessageService takes a lot of time. N9 PR1

    3) cleared the device.
    Only the third step helped. Now I don't watch time delays when I call constructor of QMessageService.
    I have the same problem..
    how do you clear the device?do you mean reflash?

  9. #9
    Registered User
    Join Date
    Apr 2012
    Posts
    6

    Re: For creation of instance of the class QMessageService takes a lot of time. N9 PR1

    I think reflash helps to, but I used Settings -> Reset -> Clear Device.

  10. #10
    Registered User
    Join Date
    Jun 2007
    Posts
    11

    Re: For creation of instance of the class QMessageService takes a lot of time. N9 PR1

    ha ok..
    and if I do "clear device", does it clean MyDocs?

  11. #11
    Registered User
    Join Date
    Apr 2012
    Posts
    6

    Re: For creation of instance of the class QMessageService takes a lot of time. N9 PR1

    Quote Originally Posted by opax View Post
    does it clean MyDocs?
    Yes, it does.

Similar Threads

  1. access 2 instance of same class same time
    By kuddy_abc in forum Symbian
    Replies: 3
    Last Post: 2010-06-08, 03:43
  2. CSmsMessage::Time() returns current time instead of the time of sms creation
    By elviin in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2010-04-30, 12:06
  3. Replies: 1
    Last Post: 2009-08-19, 08:49
  4. Reading file takes more time on Nokia E61i while less time on Nokia 2626
    By arpit2agrawal in forum Mobile Java General
    Replies: 5
    Last Post: 2008-10-15, 14:57
  5. Replies: 6
    Last Post: 2007-03-14, 12:56

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×