summaryrefslogtreecommitdiffstats
path: root/src/core/type_conversion.h
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@theqtcompany.com>2016-04-20 16:57:29 +0200
committerMichael BrĂ¼ning <michael.bruning@theqtcompany.com>2016-04-21 08:17:37 +0000
commit783db9da6962c331b126f0d2262a0c0600cf46ff (patch)
tree5e1473fbe2421e832f3a752924ddde3bbc1e2748 /src/core/type_conversion.h
parentd236c5a8a34803bda6115956184398b99dbba408 (diff)
Fix copying images to clipboard
The SkBitmap to QImage conversion in ClipboardQt::WriteBitmap was hardcoding the image format to ARGB32. This failed whenever the format of the SkBitmap provided by Chromium was different. This change backports 1cf9175e from 5.7. Task-number: QTBUG-52715 Change-Id: Icf27b97bc421a2201c307a4514928dcf384d9ba6 Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'src/core/type_conversion.h')
-rw-r--r--src/core/type_conversion.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/type_conversion.h b/src/core/type_conversion.h
index e97ebed6f..a08c4c26f 100644
--- a/src/core/type_conversion.h
+++ b/src/core/type_conversion.h
@@ -148,6 +148,8 @@ inline QImage toQImage(const SkBitmap &bitmap, QImage::Format format)
return QImage((uchar *)pixelRef->pixels(), bitmap.width(), bitmap.height(), format);
}
+QImage toQImage(const SkBitmap &bitmap);
+
inline QMatrix4x4 toQt(const SkMatrix44 &m)
{
QMatrix4x4 qtMatrix(