qtmobility/src/contacts/filters/qcontactdetailfilter.cpp
changeset 14 6fbed849b4f4
parent 11 06b8e2af4411
equal deleted inserted replaced
11:06b8e2af4411 14:6fbed849b4f4
    70 {
    70 {
    71 }
    71 }
    72 
    72 
    73 /*!
    73 /*!
    74  * Sets the name of the detail definition of which details will be matched to \a definitionName, and the name of the field in
    74  * Sets the name of the detail definition of which details will be matched to \a definitionName, and the name of the field in
    75  * details of that definition which will contain the value criterion to \a fieldName
    75  * details of that definition which will contain the value criterion to \a fieldName.
       
    76  * If \a definitionName is empty, the detail filter will match no contacts.  If \a fieldName
       
    77  * is empty, the detail filter acts like a "detail exists" filter; if any detail of the specified definition
       
    78  * is present in a contact, that contact will match the filter, regardless of what values might be
       
    79  * stored in that detail.
    76  * \sa detailDefinitionName()
    80  * \sa detailDefinitionName()
    77  */
    81  */
    78 void QContactDetailFilter::setDetailDefinitionName(const QString& definitionName, const QString& fieldName)
    82 void QContactDetailFilter::setDetailDefinitionName(const QString& definitionName, const QString& fieldName)
    79 {
    83 {
    80     Q_D(QContactDetailFilter);
    84     Q_D(QContactDetailFilter);
    81     d->m_defId = definitionName;
    85     d->m_defId = definitionName;
    82     d->m_fieldId = fieldName;
    86     d->m_fieldId = fieldName;
    83 }
    87 }
    84 
    88 
    85 /*!
    89 /*!
    86  * Sets the value criterion of the filter to \a value
    90  * Sets the value criterion of the filter to \a value.
    87  * \sa value()
    91  * Note that if the field name criterion (set via setDetailDefinitionName())
       
    92  * of the filter is an empty string, this value will be ignored.
       
    93  * \sa value(), setDetailDefinitionName()
    88  */
    94  */
    89 void QContactDetailFilter::setValue(const QVariant& value)
    95 void QContactDetailFilter::setValue(const QVariant& value)
    90 {
    96 {
    91     Q_D(QContactDetailFilter);
    97     Q_D(QContactDetailFilter);
    92     d->m_exactValue = value;
    98     d->m_exactValue = value;