Results 1 to 2 of 2

Thread: Save a message in system store with QMessageService

  1. #1
    Join Date
    Oct 2009
    Location
    Mantova, Italy
    Posts
    15
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60

    Default Save a message in system store with QMessageService

    Hi.
    I'm trying to save a message in the system store via QtMobility.

    the code is this:
    Qt Code:
    1. QMessageService *systemMessageService=new QMessageService;
    2. QMessage *sysMsg=new QMessage;
    3. QMessageAddress sysNum;
    4. sysNum.setAddressee(_sendedMsg.getPhoneNumber().toString());
    5. sysMsg->setBody(_sendedMsg.getText());
    6. sysMsg->setDate(QDateTime::currentDateTime());
    7. sysMsg->setParentAccountId(QMessageAccount::defaultAccount(QMessage::Sms));
    8. sysMsg->setTo(sysNum);
    9. sysMsg->setStatus(QMessage::Read);
    10. sysMsg->setType(QMessage::Sms);
    11. systemMessageManager->addMessage(sysMsg);
    12. if (!systemMessageService->exportUpdates(QMessageAccount::defaultAccount(QMessage::Sms)))
    13. showNoticeDialog(QString::number(systemMessageService->error()));
    To copy to clipboard, switch view to plain text mode 

    The problem is that exportUpdates fails everytime with error code 8 ( QMessageManager::RequestIncomplete ).
    No problem with addMessage. it never fails.
    I can't find any example on google and i think that i'm forgotting something (incomplete data in sysMsg?).

    Any suggestions?

    Thanks.
    Ivan.

  2. #2
    Join Date
    Oct 2009
    Location
    Mantova, Italy
    Posts
    15
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60

    Default Re: Save a message in system store with QMessageService

    still have the same issue. Google can't help...

Similar Threads

  1. Mac App Store
    By serkol in forum Installation and Deployment
    Replies: 20
    Last Post: 1st December 2011, 12:29
  2. Replies: 8
    Last Post: 21st March 2011, 12:40
  3. system tray message is not displaying near tary icon
    By sudhansu in forum Qt Programming
    Replies: 0
    Last Post: 29th March 2010, 17:31
  4. Replies: 4
    Last Post: 12th October 2008, 13:47
  5. treewidget and a message system
    By alisami in forum Qt Programming
    Replies: 7
    Last Post: 27th July 2008, 18:05

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.