QImage: use rvalue overloads more
to reuse internal buffers
This commit is contained in:
parent
8ab1880d9f
commit
b43432326b
1 changed files with 1 additions and 1 deletions
|
@ -383,7 +383,7 @@ QSharedPointer<QIODevice> DBusNotificationsListener::iconForImageData(const QVar
|
||||||
|
|
||||||
QImage image(reinterpret_cast<uchar *>(imageData.data()), width, height, rowStride, hasAlpha ? QImage::Format_ARGB32 : QImage::Format_RGB32);
|
QImage image(reinterpret_cast<uchar *>(imageData.data()), width, height, rowStride, hasAlpha ? QImage::Format_ARGB32 : QImage::Format_RGB32);
|
||||||
if (hasAlpha) {
|
if (hasAlpha) {
|
||||||
image = image.rgbSwapped(); // RGBA --> ARGB
|
image = std::move(image).rgbSwapped(); // RGBA --> ARGB
|
||||||
}
|
}
|
||||||
|
|
||||||
QSharedPointer<QIODevice> buffer = iconFromQImage(image);
|
QSharedPointer<QIODevice> buffer = iconFromQImage(image);
|
||||||
|
|
Loading…
Reference in a new issue