src/versit/qversitproperty.cpp
changeset 5 603d3f8b6302
parent 0 876b1a06bc25
equal deleted inserted replaced
3:e4ebb16b39ea 5:603d3f8b6302
    50 
    50 
    51 /*!
    51 /*!
    52   \class QVersitProperty
    52   \class QVersitProperty
    53   \brief The QVersitProperty class stores the name, value, groups and parameters of a Versit property.
    53   \brief The QVersitProperty class stores the name, value, groups and parameters of a Versit property.
    54   \ingroup versit
    54   \ingroup versit
       
    55   \inmodule QtVersit
    55 
    56 
    56   A vCard is represented in abstract form as a QVersitDocument that consists of a number of
    57   A vCard is represented in abstract form as a QVersitDocument that consists of a number of
    57   properties such as a name (N), a telephone number (TEL) and an email address (EMAIL), for
    58   properties such as a name (N), a telephone number (TEL) and an email address (EMAIL), for
    58   instance.  Each of these properties is stored as an instance of a QVersitProperty in a
    59   instance.  Each of these properties is stored as an instance of a QVersitProperty in a
    59   QVersitDocument.
    60   QVersitDocument.
   180     dbg.nospace() << name;
   181     dbg.nospace() << name;
   181     QHash<QString,QString>::const_iterator it;
   182     QHash<QString,QString>::const_iterator it;
   182     for (it = parameters.constBegin(); it != parameters.constEnd(); ++it) {
   183     for (it = parameters.constBegin(); it != parameters.constEnd(); ++it) {
   183         dbg.nospace() << ';' << it.key() << '=' << it.value();
   184         dbg.nospace() << ';' << it.key() << '=' << it.value();
   184     }
   185     }
   185     dbg.nospace() << ':' << property.variantValue();
   186     if (property.valueType() == QVersitProperty::VersitDocumentType)
       
   187         dbg.nospace() << ':' << property.value<QVersitDocument>();
       
   188     else
       
   189         dbg.nospace() << ':' << property.variantValue();
   186     dbg.nospace() << ')';
   190     dbg.nospace() << ')';
   187     return dbg.maybeSpace();
   191     return dbg.maybeSpace();
   188 }
   192 }
   189 #endif
   193 #endif
   190 
   194 
   360 {
   364 {
   361     d->mGroups.clear();
   365     d->mGroups.clear();
   362     d->mName.clear();
   366     d->mName.clear();
   363     d->mValue.clear();
   367     d->mValue.clear();
   364     d->mParameters.clear();
   368     d->mParameters.clear();
       
   369     d->mValueType = QVersitProperty::PlainType;
   365 }
   370 }
   366 
   371 
   367 QTM_END_NAMESPACE
   372 QTM_END_NAMESPACE