Skip to content

Commit 448623d

Browse files
committed
service/notifications: use bytes over bits in pixmap rowstride check
Fixes incorrect rowstride warnings.
1 parent dfededc commit 448623d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/services/notifications/dbusimage.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,9 @@ const QDBusArgument& operator>>(const QDBusArgument& argument, DBusNotificationI
4242
} else if (channels != (pixmap.hasAlpha ? 4 : 3)) {
4343
qCWarning(logNotifications) << "Unable to parse pixmap as channel count is incorrect."
4444
<< "Got " << channels << "expected" << (pixmap.hasAlpha ? 4 : 3);
45-
} else if (rowstride != pixmap.width * sampleBits * channels) {
45+
} else if (rowstride != pixmap.width * channels) {
4646
qCWarning(logNotifications) << "Unable to parse pixmap as rowstride is incorrect. Got"
47-
<< rowstride << "expected"
48-
<< (pixmap.width * sampleBits * channels);
47+
<< rowstride << "expected" << (pixmap.width * channels);
4948
}
5049

5150
return argument;
@@ -55,7 +54,7 @@ const QDBusArgument& operator<<(QDBusArgument& argument, const DBusNotificationI
5554
argument.beginStructure();
5655
argument << pixmap.width;
5756
argument << pixmap.height;
58-
argument << pixmap.width * (pixmap.hasAlpha ? 4 : 3) * 8;
57+
argument << pixmap.width * (pixmap.hasAlpha ? 4 : 3);
5958
argument << pixmap.hasAlpha;
6059
argument << 8;
6160
argument << (pixmap.hasAlpha ? 4 : 3);

0 commit comments

Comments
 (0)