[Libreoffice-commits] core.git: vcl/qt5

Katarina Behrens Katarina.Behrens at cib.de
Tue Jul 10 17:44:34 UTC 2018


 vcl/qt5/Qt5Data.cxx |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit a9466a07a34f33a6efeafb8a636617bf76f9fec8
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date:   Tue Jul 10 13:22:30 2018 +0200

    Bitmap cursors contain XBM data, read them accordingly
    
    Change-Id: I8d5cf48fb37db8e6e5c8058f92b69659838f3471
    Reviewed-on: https://gerrit.libreoffice.org/57229
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>

diff --git a/vcl/qt5/Qt5Data.cxx b/vcl/qt5/Qt5Data.cxx
index 350db44c3c16..60d555438944 100644
--- a/vcl/qt5/Qt5Data.cxx
+++ b/vcl/qt5/Qt5Data.cxx
@@ -161,12 +161,9 @@ Qt5Data::~Qt5Data() {}
 static QCursor* getQCursorFromXBM(const unsigned char* pBitmap, const unsigned char* pMask,
                                   int nWidth, int nHeight, int nXHot, int nYHot)
 {
-    QBitmap aPixmap;
-    aPixmap.loadFromData(pBitmap, nWidth * nHeight / 8, "XPM");
-    QBitmap aMask;
-    aMask.loadFromData(pMask, nWidth * nHeight / 8, "XPM");
-    aPixmap.setMask(aMask);
-    return new QCursor(aPixmap, nXHot, nYHot);
+    QBitmap aPixmap = QBitmap::fromData(QSize(nWidth, nHeight), pBitmap);
+    QBitmap aMask = QBitmap::fromData(QSize(nWidth, nHeight), pMask);
+    return new QCursor(aPixmap, aMask, nXHot, nYHot);
 }
 
 #define MAKE_CURSOR(vcl_name, name)                                                                \


More information about the Libreoffice-commits mailing list