summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoseph Donofry <joedonofry@gmail.com>2019-07-05 16:31:01 -0400
committerJoseph Donofry <joedonofry@gmail.com>2019-07-05 16:31:01 -0400
commite5576f03d4b8728cfc182ee8802a39905f630db8 (patch)
tree4b55c8e7b0e6419eb092df697ed101351e8dfc45
parentFix support for Qt versions < 5.11 (diff)
downloadnheko-e5576f03d4b8728cfc182ee8802a39905f630db8.tar.xz
Fix additional Qt version issue
-rw-r--r--src/notifications/ManagerLinux.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/notifications/ManagerLinux.cpp b/src/notifications/ManagerLinux.cpp
index 1d9f97d9..1914f61c 100644
--- a/src/notifications/ManagerLinux.cpp
+++ b/src/notifications/ManagerLinux.cpp
@@ -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;
 }