×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2011
    Posts
    60

    QContact not working on nokia X6...

    Hello every body,
    This code example used to show the list of contacts that existing on the phone.
    My problem is that this code worked on nokia 5530 and E71 but on X6 not.
    On X6 I can not see any contact on list. Why?

    Code:
        //Find available managers and remove invalid them.
        availableManagers = QContactManager::availableManagers();
        availableManagers.removeAll("invalid");
        foreach(QString managerName, availableManagers)
        {
            QMap<QString, QString> params;
            //Returns a URI that completely describes a manager implementation, datastore, and the parameters
            QString managerUri = QContactManager::buildUri(managerName, params);
            m_availableManagers.insert(managerName, managerUri);
        }
    
        // show the list widget that contains all of contacts. (symbian manager)
        QString managerUri;
        for(int i = 0; i < availableManagers.count(); i++)
        {
            managerUri = m_availableManagers.value(availableManagers.at(i));
            if(managerUri.contains("symbian:"))
                break;
            else
                managerUri.clear();
        }
    
        if (m_manager)
            disconnect(m_manager, 0, this, 0); // we no longer want updates from the old manager
    
        // the change is real.  update.
        if (m_initialisedManagers.contains(managerUri))
        {
            m_manager = m_initialisedManagers.value(managerUri);
        }
        else
        {
            m_manager = QContactManager::fromUri(managerUri);
            if (m_manager->error()) {
                QMessageBox::information(this, tr("Failed!"), QString("Failed to open store!\n(error code %1)").arg(m_manager->error()));
                delete m_manager;
                m_manager = 0;
                return;
            }
            m_initialisedManagers.insert(managerUri, m_manager);
        }
    
        //Given an input filter, returns the canonical version of the filter.
        m_currentFilter = QContactManagerEngine::canonicalizedFilter(filter);
    
        m_contacts = m_manager->contacts(m_currentFilter); // return 0 item
        if(!m_contacts.isEmpty())
        {
            numberOfContacts = m_contacts.lastIndexOf(m_contacts.last()) + 1;
        }
        foreach (QContact contact, m_contacts)
        {
            QListWidgetItem *currItem = new QListWidgetItem;
            currItem->setData(Qt::DisplayRole, contact.displayLabel());
            currItem->setData(Qt::UserRole, contact.localId()); // also store the id of the contact.
            m_contactsList->addItem(currItem);
        }

  2. #2
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Re: QContact not working on nokia X6...

    Are there any contacts in the X6 already ? If not add and then try.

    X6 is the S60 5th edition device, same as 5530.

    It should work, because both have same OS , and support Qt development.

  3. #3
    Registered User
    Join Date
    Mar 2011
    Posts
    60

    Re: QContact not working on nokia X6...

    Quote Originally Posted by rahulvala View Post
    Are there any contacts in the X6 already ? If not add and then try.

    X6 is the S60 5th edition device, same as 5530.

    It should work, because both have same OS , and support Qt development.
    Yes, there are. When I add a contact from my app, it is not show on my contact list, but add to mobile contact list.
    Last edited by hamideh_tavakoli; 2011-11-23 at 10:16.

  4. #4
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Re: QContact not working on nokia X6...

    Check mobility is correctly installed or not in device.
    http://doc.qt.nokia.com/qtmobility-1...t.html#details

    regards,
    rahul

Similar Threads

  1. Bluetooth connection working in emulator, but not working on Nokia E52
    By voroske.julia in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2011-05-30, 13:01
  2. QContact program compilation error
    By yannifan in forum [Archived] Qt Mobility Project
    Replies: 11
    Last Post: 2011-03-31, 19:06
  3. com.nokia.mid.ui.DeviceControl on Nokia 7610 not working
    By bassman5 in forum Mobile Java General
    Replies: 11
    Last Post: 2005-06-02, 19:18

Posting Permissions

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