qtcontactsmobility/DEPRECATION
changeset 40 b46a585f6909
parent 27 de1630741fbe
equal deleted inserted replaced
37:fd64c38c277d 40:b46a585f6909
     1 Deprecation guide (23 March 2010)
     1 Deprecation guide (8th April 2010)
     2 =================
     2 =================
     3 Known source breaks:
     3 Known source breaks:
     4     There are a number of source breaks that nearly all just affect engine writers - marked with [!] in this document.  Largely
     4     There are a number of source breaks that nearly all just affect engine writers - marked with [!] in this document.  Largely
     5     these fall into two classes - 1) interface functions becoming pure virtual and 2) return type changing.
     5     these fall into two classes - 1) interface functions becoming pure virtual and 2) return type changing.
     6 
     6 
    31 
    31 
    32 General changes:
    32 General changes:
    33     Q_DECLARE_LATIN1_LITERAL -> Q_DECLARE_LATIN1_CONSTANT and Latin1Literal -> QLatin1Constant - Don't use the old ones.
    33     Q_DECLARE_LATIN1_LITERAL -> Q_DECLARE_LATIN1_CONSTANT and Latin1Literal -> QLatin1Constant - Don't use the old ones.
    34     QContactRelationshipFilter::Role moved to QContactRelationship::Role (affects all places that deal with relationships)
    34     QContactRelationshipFilter::Role moved to QContactRelationship::Role (affects all places that deal with relationships)
    35     QContactLocalId - definition moved to qcontactid.h from qtcontactsglobal.h (old header includes new one right now)
    35     QContactLocalId - definition moved to qcontactid.h from qtcontactsglobal.h (old header includes new one right now)
       
    36     dtors for a number of classes have been removed, since they were empty and will always be empty.
       
    37     QContactDetails now use Latin1 strings as the keys for values (and for their definition name).  QString keys will still work.
       
    38 
       
    39     Several classes have been adjusted so that they are now "small" (sizeof(class) <= sizeof(void*)) - this means
       
    40     that lists/hashes/maps of them will be more efficient, but code needs recompilation.
    36 
    41 
    37 QContact:
    42 QContact:
    38     Deprecated members:
    43     Deprecated members:
    39         setRelationshipOrder()  [No replacement]
    44         setRelationshipOrder()  [No replacement]
    40         relationshipOrder()     [No replacement]
    45         relationshipOrder()     [No replacement]
    47 QContactManager:
    52 QContactManager:
    48     General changes:
    53     General changes:
    49         All fetch functions taking a list of detail definitions to retrieve have been changed to use QContactFetchHint instead
    54         All fetch functions taking a list of detail definitions to retrieve have been changed to use QContactFetchHint instead
    50         Some functions now take a const List<T>& rather than a List<T>*
    55         Some functions now take a const List<T>& rather than a List<T>*
    51         Functions returning a QList<QContactManager::Error> are replaced with parameters pointing to an error map to fill in
    56         Functions returning a QList<QContactManager::Error> are replaced with parameters pointing to an error map to fill in
       
    57         Constructors are now explicit.
    52     Deprecated members:
    58     Deprecated members:
    53         2 x contacts(.. QStringList definitionRestrictions ..)  [use contacts functions that takes QContactFetchHint instead]
    59         2 x contacts(.. QStringList definitionRestrictions ..)  [use contacts functions that takes QContactFetchHint instead]
    54         contact(.. QStringList definitionRestrictions ..)       [use contact function that takes QContactFetchHint instead]
    60         contact(.. QStringList definitionRestrictions ..)       [use contact function that takes QContactFetchHint instead]
    55         removeContacts(QList<QContact>* contacts, ...)          [use removeContacts(const QList<QContact>&, ...) instead]
    61         removeContacts(QList<QContact>* contacts, ...)          [use removeContacts(const QList<QContact>&, ...) instead]
    56         2 x relationships(.. taking a QCRF::Role ..)            [use relationships functions that take QContactRelationship::Role instead]
    62         2 x relationships(.. taking a QCRF::Role ..)            [use relationships functions that take QContactRelationship::Role instead]
    90     New members:
    96     New members:
    91         fetchHint()
    97         fetchHint()
    92         setFetchHint()
    98         setFetchHint()
    93 
    99 
    94 QContactDetail:
   100 QContactDetail:
       
   101     The ctors have been marked explicit, to avoid accidentally invoking a conversion from const char* or QString.
       
   102     The keys for all values (and definition name) are now stored as latin1 strings (const char*), resulting in
       
   103     significant memory and runtime savings.  QStrings used as keys will still work, but be converted to latin1
       
   104     first.
       
   105 
    95     Deprecated members:
   106     Deprecated members:
    96         preferredActions                  [No replacement]
   107         preferredActions                  [No replacement]
    97         setPreferredActions                 [No replacement]
   108         setPreferredActions                 [No replacement]
    98 
   109 
    99 QContactRelationship:
   110 QContactRelationship:
   229     General:
   240     General:
   230         Added capability of writing directly to a qbytearray
   241         Added capability of writing directly to a qbytearray
   231         Added ctors with iodevice and bytearray for destination
   242         Added ctors with iodevice and bytearray for destination
   232         startWriting() and cancel() are now slots
   243         startWriting() and cancel() are now slots
   233         waitForFinished() is now an invokable
   244         waitForFinished() is now an invokable
       
   245 
       
   246 -----------------------
       
   247 Deprecated Guide (19th April 2010)
       
   248 
       
   249 QContact:
       
   250     - QContact::detailWithAction(const QString& actionName) is deprecated
       
   251     - QContact::detailsWithAction(const QString& actionName) is deprecated
       
   252     -> these are replaced by QContact::detail(s)WithAction(QAction* actionPtr)
       
   253 
       
   254 QContactManager:
       
   255     - QContactManager::synthesizedDisplayLabel(const QContact& contact) is deprecated
       
   256     -> replaced by QContactManager::synthesizedContactDisplayLabel(const QContact& contact)
       
   257 
       
   258 QContactManagerEngine:
       
   259     - functions no longer pure virtual.
       
   260 
       
   261 QContactDetailDefinitionRemoveRequest:
       
   262     - QContactDetailDefinitionRemoveRequest::setDefinitionNames(const QString& contactType, const QStringList& definitionNames)) is deprecated
       
   263     -> replaced by QContactDetailDefinitionRemoveRequest::setContactType(const QString& contactType) + QContactDetailDefinitionRemoveRequest::setDefinitionNames(const QStringList& definitionNames).