nemomobile/qtcontacts-sqlite — pull request #180 by amtep (2014-10-02 21:30:00+00:00)
Title: [twowaysync] Use a fixed encoding version for OOB data

The twowaysync adapter was storing serialized data using
QDataStream, but QDataStream's encoding can change in
incompatible ways and it defaults to the most recent
encoding version. This was causing crashes when an
adapter running with Qt 5.2 tried to load data serialized
with Qt 5.1, because the encoding of QDateTime changed.

Fix this by committing to the Qt 5.1 version, which was
the one in widespread use at the time of this commit.
(Also, we got lucky and existing Qt 5.2 data can be
safely loaded with the 5.1 version because we're only
using UTC timestamps. The timestamps will be decoded
wrong, but that will be corrected by the sync and it
won't crash).

It is probable that support for future versions of Qt
will make it necessary to update the encoding version.
This can be done by explicitly converting the encoded
data in the schema upgrade code in contactsdatabase.cpp.