mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-29 09:22:18 -07:00
Downgrade to 6.3 datastream
Took 5 minutes
This commit is contained in:
parent
3ad6dc08d9
commit
d665ceb0bd
3 changed files with 6 additions and 6 deletions
|
|
@ -28,7 +28,7 @@ QByteArray serializeProperties(const QVariantHash &props)
|
|||
{
|
||||
QByteArray blob;
|
||||
QDataStream out(&blob, QIODevice::WriteOnly);
|
||||
out.setVersion(QDataStream::Qt_6_5);
|
||||
out.setVersion(QDataStream::Qt_6_3);
|
||||
out << props;
|
||||
return blob;
|
||||
}
|
||||
|
|
@ -42,7 +42,7 @@ void CardInfo::ensurePropertiesLoaded() const
|
|||
}
|
||||
if (!propertiesBlob.isEmpty()) {
|
||||
QDataStream in(propertiesBlob);
|
||||
in.setVersion(QDataStream::Qt_6_5);
|
||||
in.setVersion(QDataStream::Qt_6_3);
|
||||
in >> propertiesCache;
|
||||
}
|
||||
propertiesLoaded = true;
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ void writeHashBlob(QDataStream &out, const QVariantHash &h)
|
|||
{
|
||||
QByteArray blob;
|
||||
QDataStream blobOut(&blob, QIODevice::WriteOnly);
|
||||
blobOut.setVersion(QDataStream::Qt_6_5);
|
||||
blobOut.setVersion(QDataStream::Qt_6_3);
|
||||
blobOut << h;
|
||||
out << static_cast<quint32>(blob.size());
|
||||
out.writeRawData(blob.constData(), blob.size());
|
||||
|
|
@ -329,7 +329,7 @@ bool CardDatabaseCache::write(const QString &cachePath, const CardDatabaseData &
|
|||
}
|
||||
|
||||
QDataStream out(&file);
|
||||
out.setVersion(QDataStream::Qt_6_5);
|
||||
out.setVersion(QDataStream::Qt_6_3);
|
||||
|
||||
// Header
|
||||
out << CACHE_MAGIC;
|
||||
|
|
@ -379,7 +379,7 @@ bool CardDatabaseCache::read(const QString &cachePath,
|
|||
QBuffer buffer(const_cast<QByteArray *>(&raw));
|
||||
buffer.open(QIODevice::ReadOnly);
|
||||
QDataStream in(&buffer);
|
||||
in.setVersion(QDataStream::Qt_6_5);
|
||||
in.setVersion(QDataStream::Qt_6_3);
|
||||
|
||||
quint32 magic = 0;
|
||||
quint32 version = 0;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ void PrintingInfo::ensurePropertiesLoaded() const
|
|||
propertiesCache.clear();
|
||||
if (!propertiesBlob.isEmpty()) {
|
||||
QDataStream in(propertiesBlob);
|
||||
in.setVersion(QDataStream::Qt_6_5);
|
||||
in.setVersion(QDataStream::Qt_6_3);
|
||||
in >> propertiesCache;
|
||||
}
|
||||
propertiesLoaded = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue