2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Use QDataStream directly on QByteArray.

This commit is contained in:
John Preston
2017-08-08 20:25:10 +02:00
parent dd9d604966
commit edbc3f8fde
6 changed files with 9 additions and 44 deletions

View File

@@ -1176,10 +1176,7 @@ QByteArray iconMaskValueSize(int width, int height) {
QLatin1String sizeTag("SIZE:");
result.append(sizeTag.data(), sizeTag.size());
{
QBuffer buffer(&result);
buffer.open(QIODevice::Append);
QDataStream stream(&buffer);
QDataStream stream(&result, QIODevice::Append);
stream.setVersion(QDataStream::Qt_5_1);
stream << qint32(width) << qint32(height);
}