diff --git a/src/widgets/osd_x11.cpp b/src/widgets/osd_x11.cpp index e4f8462eb..92cf876ab 100644 --- a/src/widgets/osd_x11.cpp +++ b/src/widgets/osd_x11.cpp @@ -91,7 +91,7 @@ QDBusArgument &operator<<(QDBusArgument &arg, const QImage &image) { int channels = i.isGrayscale() ? 1 : (i.hasAlphaChannel() ? 4 : 3); arg << i.depth() / channels; arg << channels; - arg << QByteArray(reinterpret_cast(i.bits()), i.byteCount()); + arg << QByteArray(reinterpret_cast(i.bits()), i.sizeInBytes()); arg.endStructure(); return arg;