From 448623de5a7cff8a878373b54d3675b5840a54f9 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Fri, 25 Jul 2025 22:08:15 -0700 Subject: [PATCH] service/notifications: use bytes over bits in pixmap rowstride check Fixes incorrect rowstride warnings. --- src/services/notifications/dbusimage.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/services/notifications/dbusimage.cpp b/src/services/notifications/dbusimage.cpp index e6c091bc..469d08c0 100644 --- a/src/services/notifications/dbusimage.cpp +++ b/src/services/notifications/dbusimage.cpp @@ -42,10 +42,9 @@ const QDBusArgument& operator>>(const QDBusArgument& argument, DBusNotificationI } else if (channels != (pixmap.hasAlpha ? 4 : 3)) { qCWarning(logNotifications) << "Unable to parse pixmap as channel count is incorrect." << "Got " << channels << "expected" << (pixmap.hasAlpha ? 4 : 3); - } else if (rowstride != pixmap.width * sampleBits * channels) { + } else if (rowstride != pixmap.width * channels) { qCWarning(logNotifications) << "Unable to parse pixmap as rowstride is incorrect. Got" - << rowstride << "expected" - << (pixmap.width * sampleBits * channels); + << rowstride << "expected" << (pixmap.width * channels); } return argument; @@ -55,7 +54,7 @@ const QDBusArgument& operator<<(QDBusArgument& argument, const DBusNotificationI argument.beginStructure(); argument << pixmap.width; argument << pixmap.height; - argument << pixmap.width * (pixmap.hasAlpha ? 4 : 3) * 8; + argument << pixmap.width * (pixmap.hasAlpha ? 4 : 3); argument << pixmap.hasAlpha; argument << 8; argument << (pixmap.hasAlpha ? 4 : 3);