Skip to content
Snippets Groups Projects
Verified Commit e5576f03 authored by Joe Donofry's avatar Joe Donofry
Browse files

Fix additional Qt version issue

parent 4c0d4f35
No related branches found
No related tags found
No related merge requests found
......@@ -142,7 +142,11 @@ operator<<(QDBusArgument &arg, const QImage &image)
int channels = i.isGrayscale() ? 1 : (i.hasAlphaChannel() ? 4 : 3);
arg << i.depth() / channels;
arg << channels;
#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
arg << QByteArray(reinterpret_cast<const char *>(i.bits()), i.byteCount());
#else
arg << QByteArray(reinterpret_cast<const char *>(i.bits()), i.sizeInBytes());
#endif
arg.endStructure();
return arg;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment