diff options
| author | Kevin Wu Won <kevin.wu-won@nokia.com> | 2010-05-13 15:42:43 +1000 |
|---|---|---|
| committer | Kevin Wu Won <kevin.wu-won@nokia.com> | 2010-05-13 15:42:43 +1000 |
| commit | 8c1d47bdc3b84e9afe239cb3430e69ebdda341d3 (patch) | |
| tree | c295d3d0e4465f5b6c033f438228d97c1d7de115 /doc/src/snippets/qtcontactsdocsample/qtcontactsdocsample.cpp | |
| parent | fbc68af0cc6573aa851c4b67ec28e8817dd987a7 (diff) | |
| parent | 22a2dfd19b76879c887376645a76c441148a3a26 (diff) | |
Merge branch '1.0'
Conflicts:
plugins/contacts/maemo5/qcontactabook.cpp
plugins/contacts/symbian/src/transform/cnttransformcontact.cpp
plugins/contacts/symbian/symbian.pro
plugins/contacts/symbian/tsrc/tsrc.pri
plugins/contacts/symbian/tsrc/tst_qcontactmanagersymbian/tst_qcontactmanagersymbian.cpp
Diffstat (limited to 'doc/src/snippets/qtcontactsdocsample/qtcontactsdocsample.cpp')
| -rw-r--r-- | doc/src/snippets/qtcontactsdocsample/qtcontactsdocsample.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/src/snippets/qtcontactsdocsample/qtcontactsdocsample.cpp b/doc/src/snippets/qtcontactsdocsample/qtcontactsdocsample.cpp index 6db8ed9020..b2e62bef06 100644 --- a/doc/src/snippets/qtcontactsdocsample/qtcontactsdocsample.cpp +++ b/doc/src/snippets/qtcontactsdocsample/qtcontactsdocsample.cpp @@ -610,6 +610,17 @@ void shortsnippets() QList<QContactId> therapists = contact.relatedContacts("HasTherapist", QContactRelationship::Second); } //! [6] + //! [Getting all tags] + QSet<QString> tags; + foreach(const QContactTag& tag, contact.details<QContactTag>()) { + tags.insert(tag.tag()); + } + //! [Getting all tags] + //! [Checking for a specific tag] + if (contact.details<QContactTag>(QContactTag::FieldTag, "MyTag").count() > 0) { + // Do something with it + } + //! [Checking for a specific tag] } } |
