summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/qtcontactsdocsample/qtcontactsdocsample.cpp
diff options
context:
space:
mode:
authorMichael Goddard <michael.goddard@nokia.com>2010-04-14 16:21:55 +1000
committerMichael Goddard <michael.goddard@nokia.com>2010-04-15 16:12:48 +1000
commit257f7ffc320774d6c470b88ab7828b56fe0f5805 (patch)
tree3f8d0bfe7d24b8bb9d847f3f30f59dda2fc24225 /doc/src/snippets/qtcontactsdocsample/qtcontactsdocsample.cpp
parentd4c1f00c45709f692a0e0610768268c1ff63b890 (diff)
Make it possible do a controlled update of the display label of a QContact.
Add a function to allow the display label to be reformatted given a QContactManager. Task-number: MOBILITY-827
Diffstat (limited to 'doc/src/snippets/qtcontactsdocsample/qtcontactsdocsample.cpp')
-rw-r--r--doc/src/snippets/qtcontactsdocsample/qtcontactsdocsample.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/doc/src/snippets/qtcontactsdocsample/qtcontactsdocsample.cpp b/doc/src/snippets/qtcontactsdocsample/qtcontactsdocsample.cpp
index 530d3b926b..6db8ed9020 100644
--- a/doc/src/snippets/qtcontactsdocsample/qtcontactsdocsample.cpp
+++ b/doc/src/snippets/qtcontactsdocsample/qtcontactsdocsample.cpp
@@ -525,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]
}