×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Regular Contributor
    Join Date
    Apr 2010
    Posts
    93

    Lightbulb N900 Contact Problem

    I want to add contact into N900,but the program always give the problem:exit 3,that is to say,I have add some field that meamo5 does not support,but I can not find the problem,Following is code:


    QContact curr;
    QContactName name=curr.detail(QContactName:efinitionName);
    QContactPhoneNumber phone = curr.detail(QContactPhoneNumber:efinitionName);
    QContactPhoneNumber telephone = curr.detail(QContactPhoneNumber:efinitionName);
    QContactEmailAddress email = curr.detail(QContactEmailAddress:efinitionName);


    name.setFirstName(tr("qing"));
    name.setLastName(tr("yuan"));

    phone.setContexts(QContactDetail::ContextHome);
    phone.setSubTypes(QContactPhoneNumber::SubTypeMobile);
    phone.setNumber(tr("15152253002"));

    phone.setContexts(QContactDetail::ContextWork);
    telephone.setSubTypes(QContactPhoneNumber::SubTypeLandline);
    telephone.setNumber(tr("01065345678"));
    email.setEmailAddress(tr("qingyuan@163.com")); /* save details to contact object */
    curr.saveDetail(&name);
    curr.saveDetail(&phone);
    curr.saveDetail(&telephone);
    curr.saveDetail(&email); /* save contact detail to contact manager */
    bool success = contactManager->saveContact(&curr);

    Please help,thank you !

  2. #2
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: N900 Contact Problem

    Is 3 a value returned by QContactManager::error()?

  3. #3
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: N900 Contact Problem

    Hi Chen,
    Contact validation fails because QContactPhoneNumber::SubTypeLandline is not supported in Maemo5.
    Then remove that line and your contact will be saved.

  4. #4
    Regular Contributor
    Join Date
    Apr 2010
    Posts
    93

    Re: N900 Contact Problem

    Yes,the code that deal with error is shown.

  5. #5
    Regular Contributor
    Join Date
    Apr 2010
    Posts
    93

    Re: N900 Contact Problem

    how can I get more knowledge about contact on maemo5?I just find the document ,and there are many thing that I can not understand.

  6. #6
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: N900 Contact Problem

    QContactManager::supportedContactTypes () returns the list of contact types which are supported by this manager.
    http://doc.qt.nokia.com/qtmobility-1...edContactTypes

  7. #7
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: N900 Contact Problem

    Quote Originally Posted by chensu0526 View Post
    how can I get more knowledge about contact on maemo5?I just find the document ,and there are many thing that I can not understand.
    Are those things related to maemo5 in specific or to contact in general? Anyway, feel free to ask in this forum.

Similar Threads

  1. Replies: 15
    Last Post: 2010-09-28, 07:58
  2. N900 Contact Problem
    By chensu0526 in forum Nokia N9
    Replies: 8
    Last Post: 2010-09-21, 09:33
  3. Retrieving contact avatar on N900
    By mperkusi in forum [Archived] Qt Mobility Project
    Replies: 3
    Last Post: 2010-07-29, 14:57

Posting Permissions

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