From b43432326b30200ef650a650ec3ca9b1343e3c10 Mon Sep 17 00:00:00 2001 From: Fushan Wen Date: Sat, 16 Sep 2023 20:01:55 +0800 Subject: [PATCH] QImage: use rvalue overloads more to reuse internal buffers --- plugins/sendnotifications/dbusnotificationslistener.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/sendnotifications/dbusnotificationslistener.cpp b/plugins/sendnotifications/dbusnotificationslistener.cpp index b3fe47e37..a2e3ac688 100644 --- a/plugins/sendnotifications/dbusnotificationslistener.cpp +++ b/plugins/sendnotifications/dbusnotificationslistener.cpp @@ -383,7 +383,7 @@ QSharedPointer DBusNotificationsListener::iconForImageData(const QVar QImage image(reinterpret_cast(imageData.data()), width, height, rowStride, hasAlpha ? QImage::Format_ARGB32 : QImage::Format_RGB32); if (hasAlpha) { - image = image.rgbSwapped(); // RGBA --> ARGB + image = std::move(image).rgbSwapped(); // RGBA --> ARGB } QSharedPointer buffer = iconFromQImage(image);