diff options
| author | Michael Goddard <michael.goddard@nokia.com> | 2010-04-15 21:56:09 +1000 |
|---|---|---|
| committer | Michael Goddard <michael.goddard@nokia.com> | 2010-04-15 21:56:09 +1000 |
| commit | 77452336abade53972c886abb40b3fd809e9d58d (patch) | |
| tree | e352f3fe5015c8037389f3921cd3b6e75ce5feed /doc/src/snippets/qtcontactsdocsample/qtcontactsdocsample.cpp | |
| parent | 2b116d7498bb9dde92da7fb905de3fed52ead06b (diff) | |
| parent | 5f0632b08fa9bb81380f4f40608986d4ce77a2ed (diff) | |
Merge branch '1.0' of scm.dev.nokia.troll.no:qtmobility/qtm-contacts into main1.0
Diffstat (limited to 'doc/src/snippets/qtcontactsdocsample/qtcontactsdocsample.cpp')
| -rw-r--r-- | doc/src/snippets/qtcontactsdocsample/qtcontactsdocsample.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/doc/src/snippets/qtcontactsdocsample/qtcontactsdocsample.cpp b/doc/src/snippets/qtcontactsdocsample/qtcontactsdocsample.cpp index 3d0ec44ab6..6db8ed9020 100644 --- a/doc/src/snippets/qtcontactsdocsample/qtcontactsdocsample.cpp +++ b/doc/src/snippets/qtcontactsdocsample/qtcontactsdocsample.cpp @@ -315,11 +315,12 @@ void callContact(QContactManager* cm) QContact a = cm->contact(contactIds.first()); /* Get this contact's first phone number */ - QContactAction* action = 0; QContact contact; //! [Details with action] - QList<QContactDetail> details = contact.detailsWithAction("Call"); + // Get the first "Call" action + QContactAction* action = QContactAction::action(QContactAction::actionDescriptors("Call").value(0)); + QList<QContactDetail> details = contact.detailsWithAction(action); if (details.count() == 0) { // Can't call this contact @@ -524,12 +525,8 @@ void displayLabel() name.setLastName("Arkansas"); c.saveDetail(&name); - /* At this point the display label is not updated, so print what the new one would be if we save it */ - qDebug() << "New label would be:" << manager->synthesizedDisplayLabel(c); - - /* Now save it */ - manager->saveContact(&c); - + /* Update the display label */ + manager->synthesizeContactDisplayLabel(&c); qDebug() << "Now the label is:" << c.displayLabel(); //! [Updating the display label of a contact] } |
