[Kde-pim] [Differential] [Request, 273 lines] D2254: Extend IdentityTest and fix all bugs it discovered

dvratil (Daniel Vrátil) noreply at phabricator.kde.org
Fri Jul 22 10:08:57 BST 2016


dvratil created this revision.
dvratil added a reviewer: kde-pim.
dvratil added a subscriber: mlaurent.
Restricted Application added a project: KDE PIM.

REVISION SUMMARY
  Fixes main serialization and deserialization of Identity to raw data.
  The serializer was serializing QStrings, while the deserializer was
  expecting QVariants, which did not behave as expected. The serializer
  now serializes everything as QVariants too.
  
  Fixes serialization of Signature - signature was never being stored
  in mPropertiesMap, so the key was always empty. We instead serialize
  mSignature directly. Calls to setSignature() etc. now also insert the
  mSignature into the mPropertiesMap.
  
  Improves operator==() to handle comparision between manually created
  and deserialized Identity. Deserialization will fill mPropertiesMap
  with lots of empty QVariants, but the default ctor will not so simple
  mPropertiesMap == other.mPropertiesMap comparision was failing. The
  algorithm now assumes that if a key is not present in one map but
  is present in another the maps are considered equal as long as the
  value is invalid.

REPOSITORY
  rKIDENTITYMANAGEMENT PIM: KIdentity Management

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D2254

AFFECTED FILES
  autotests/identitytest.cpp
  autotests/identitytest.h
  src/identity.cpp

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: dvratil, kde-pim
Cc: mlaurent, dvasin, winterz, smartins, vkrause, knauss, dvratil
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list