Active Topics

 


Reply
Thread Tools
eitama's Avatar
Posts: 702 | Thanked: 334 times | Joined on Feb 2010 @ Israel.
#1
Hi,

I am using a QContactManager to get ALL the contacts.
Now I want to write an "if" statement to check if the contact is of type skype/gsm/gmail/other, I can't seem to find anything in the Qt examples / documentation or google.

Anyone knows?

Thanks,
Eitam.
__________________
| Developer of Horizontal-Call - Call your contacts, fast! |
| Reverse SSH - access your N900 from anywhere, anytime |
| Using Samsung Galaxy S GT-i9000 and Nokia N900 |
| DonateMe - If you feel I helped you in a very good way, feel free to donate |
 
eitama's Avatar
Posts: 702 | Thanked: 334 times | Joined on Feb 2010 @ Israel.
#2
I worked around the problem, it's not the most efficient, but it does the trick for me.

Code:
bool horizontalcall::doesPhoneNumberExist(QContact *i_Contact)
{
    bool foundPhoneNumber = false;
    QList<QContactDetail> details = i_Contact->details();
    for (int z=0;z < details.size(); z++)
    {
        QString temp = details.at(z).definitionName();
        if (temp == "PhoneNumber") {
            foundPhoneNumber = true;
        }
    }

    return foundPhoneNumber;
}
__________________
| Developer of Horizontal-Call - Call your contacts, fast! |
| Reverse SSH - access your N900 from anywhere, anytime |
| Using Samsung Galaxy S GT-i9000 and Nokia N900 |
| DonateMe - If you feel I helped you in a very good way, feel free to donate |
 

The Following User Says Thank You to eitama For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 09:22.