mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Fix additional Qt version issue
This commit is contained in:
parent
4c0d4f35fe
commit
e5576f03d4
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue