QByteArray is serialized in different formats on the file system if the different version of Qt library is used (say 4.5.2 against 4.7.1).
I use the QSettings in my application to store the some binary data in the .ini
file. Now application is migrated to Qt 4.7.1 and if updated version of app reads (using the QSettings value method) the resulted QByteArray is not equal to the serialized by previous version of app.
Possible solution:
maintain the version of Qt used by app (I store the app version in the settings)
implement the own format for QSettings (wrapper for ini format) with own ReadFunc and WriteFunc.
read/write QByteArray settings using the QDataStream within setVersion using the maintained Qt version.
Any more simple solutions?