Set data stream versions.

This commit is contained in:
Martin Rotter 2015-06-28 08:03:19 +02:00
parent f6ce1926c0
commit 4ffab88435

View File

@ -37,6 +37,7 @@ QIcon IconFactory::fromByteArray(QByteArray array) {
buffer.open(QIODevice::ReadOnly); buffer.open(QIODevice::ReadOnly);
QDataStream in(&buffer); QDataStream in(&buffer);
in.setVersion(QDataStream::Qt_4_7);
in >> icon; in >> icon;
buffer.close(); buffer.close();
@ -49,6 +50,7 @@ QByteArray IconFactory::toByteArray(const QIcon &icon) {
buffer.open(QIODevice::WriteOnly); buffer.open(QIODevice::WriteOnly);
QDataStream out(&buffer); QDataStream out(&buffer);
out.setVersion(QDataStream::Qt_4_7);
out << icon; out << icon;
buffer.close(); buffer.close();