summaryrefslogtreecommitdiff
path: root/vcl/qt5/Qt5Data.cxx
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2018-07-10 13:22:30 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2018-07-10 19:44:10 +0200
commita9466a07a34f33a6efeafb8a636617bf76f9fec8 (patch)
tree93cd2f436e8e8d8a1b74b6f748f0032c229b2124 /vcl/qt5/Qt5Data.cxx
parent8ca6468f0f4900d4d3bb45e0e938fe35c308512c (diff)
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@fbihome.de>
Diffstat (limited to 'vcl/qt5/Qt5Data.cxx')
-rw-r--r--vcl/qt5/Qt5Data.cxx9
1 files changed, 3 insertions, 6 deletions
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) \