diff -r 90517678cc4f -r 453da2cfceef qtmobility/src/contacts/requests/qcontactdetaildefinitionremoverequest.cpp --- a/qtmobility/src/contacts/requests/qcontactdetaildefinitionremoverequest.cpp Mon May 03 13:18:40 2010 +0300 +++ b/qtmobility/src/contacts/requests/qcontactdetaildefinitionremoverequest.cpp Fri May 14 16:41:33 2010 +0300 @@ -57,21 +57,39 @@ \ingroup contacts-requests */ -/*! Constructs a new detail definition remove request */ -QContactDetailDefinitionRemoveRequest::QContactDetailDefinitionRemoveRequest() - : QContactAbstractRequest(new QContactDetailDefinitionRemoveRequestPrivate) +/*! Constructs a new detail definition remove request whose parent is the specified \a parent */ +QContactDetailDefinitionRemoveRequest::QContactDetailDefinitionRemoveRequest(QObject* parent) + : QContactAbstractRequest(new QContactDetailDefinitionRemoveRequestPrivate, parent) { } /*! - Sets the type of contact for which detail definitions should be removed to \a contactType, and the names of the detail definitions to remove from the manager to \a names. + Sets the name of the detail definition to remove from the manager to \a definitionName. Managers may store different definitions which are valid for different contact types, and so attempting to remove definitions with certain names may fail if no such - definitions exist for contacts of the given contact type, or if \a contactType is empty. + definitions exist for contacts of the given contact type, specified via setContactType(). + Equivalent to calling: + \code + setDefinitionNames(QStringList(definitionName)); + \endcode + + \sa setContactType() */ -void QContactDetailDefinitionRemoveRequest::setDefinitionNames(const QString& contactType, const QStringList& names) +void QContactDetailDefinitionRemoveRequest::setDefinitionName(const QString& definitionName) { Q_D(QContactDetailDefinitionRemoveRequest); - d->m_contactType = contactType; + d->m_names.clear(); + d->m_names.append(definitionName); +} + +/*! + Sets the names of the detail definitions to remove from the manager to \a names. + Managers may store different definitions which are valid for different contact types, and so attempting to remove definitions with certain names may fail if no such + definitions exist for contacts of the given contact type, specified via setContactType(). + \sa setContactType() + */ +void QContactDetailDefinitionRemoveRequest::setDefinitionNames(const QStringList& names) +{ + Q_D(QContactDetailDefinitionRemoveRequest); d->m_names = names; } @@ -82,6 +100,15 @@ return d->m_names; } +/*! + Sets the type of contact for which detail definitions should be removed to \a contactType + */ +void QContactDetailDefinitionRemoveRequest::setContactType(const QString& contactType) +{ + Q_D(QContactDetailDefinitionRemoveRequest); + d->m_contactType = contactType; +} + /*! Returns the type of contact for which detail definitions will be removed */ QString QContactDetailDefinitionRemoveRequest::contactType() const {