diff options
Diffstat (limited to 'doc/src/snippets/qtcontactsdocsample/qtcontactsdocsample.cpp')
| -rw-r--r-- | doc/src/snippets/qtcontactsdocsample/qtcontactsdocsample.cpp | 8 |
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] } |
