1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2025-01-15 18:30:39 +01:00

Replace QImage::byteCount() with sizeInBytes()

This commit is contained in:
Jonas Kvinge 2019-07-08 22:25:56 +02:00
parent 5e2a07d144
commit f3e852c042

View File

@ -91,7 +91,7 @@ QDBusArgument &operator<<(QDBusArgument &arg, const QImage &image) {
int channels = i.isGrayscale() ? 1 : (i.hasAlphaChannel() ? 4 : 3); int channels = i.isGrayscale() ? 1 : (i.hasAlphaChannel() ? 4 : 3);
arg << i.depth() / channels; arg << i.depth() / channels;
arg << channels; arg << channels;
arg << QByteArray(reinterpret_cast<const char*>(i.bits()), i.byteCount()); arg << QByteArray(reinterpret_cast<const char*>(i.bits()), i.sizeInBytes());
arg.endStructure(); arg.endStructure();
return arg; return arg;