qtmobility/src/contacts/requests/qcontactdetaildefinitionsaverequest.cpp
changeset 5 453da2cfceef
parent 4 90517678cc4f
child 11 06b8e2af4411
--- a/qtmobility/src/contacts/requests/qcontactdetaildefinitionsaverequest.cpp	Mon May 03 13:18:40 2010 +0300
+++ b/qtmobility/src/contacts/requests/qcontactdetaildefinitionsaverequest.cpp	Fri May 14 16:41:33 2010 +0300
@@ -58,12 +58,26 @@
   \ingroup contacts-requests
  */
 
-/*! Constructs a new detail definition save request */
-QContactDetailDefinitionSaveRequest::QContactDetailDefinitionSaveRequest()
-    : QContactAbstractRequest(new QContactDetailDefinitionSaveRequestPrivate)
+/*! Constructs a new detail definition save request whose parent is the specified \a parent */
+QContactDetailDefinitionSaveRequest::QContactDetailDefinitionSaveRequest(QObject* parent)
+    : QContactAbstractRequest(new QContactDetailDefinitionSaveRequestPrivate, parent)
 {
 }
 
+/*!
+  Sets the definition to save to be the given \a definition.
+  Equivalent to calling:
+  \code
+      setDefinitions(QList<QContactDetailDefinition>() << definition);
+  \endcode
+ */
+void QContactDetailDefinitionSaveRequest::setDefinition(const QContactDetailDefinition& definition)
+{
+    Q_D(QContactDetailDefinitionSaveRequest);
+    d->m_definitions.clear();
+    d->m_definitions.append(definition);
+}
+
 /*! Sets the definitions to save to be \a definitions */
 void QContactDetailDefinitionSaveRequest::setDefinitions(const QList<QContactDetailDefinition>& definitions)
 {