From f6c17c37ba4e588a8c9a579cfbfb40709fe7cf0e Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Mon, 30 Jan 2017 17:06:35 -0800 Subject: [PATCH] QCursor: Remove old pixmaps and use native cursor on macOS The DragCopyCursor part is a regression from ed55c4a14c9e8b70b3947c. Change-Id: Id98a40c372e48f09d8c1824a4c2c1df2a3bdd052 Task-number: QTBUG-58378 Reviewed-by: Erik Verbruggen --- .../platforms/cocoa/images/copyarrowcursor.png | Bin 1976 -> 0 bytes .../platforms/cocoa/images/forbiddencursor.png | Bin 1745 -> 0 bytes src/plugins/platforms/cocoa/qcocoacursor.mm | 9 ++++----- src/plugins/platforms/cocoa/qcocoaresources.qrc | 14 ++++++-------- 4 files changed, 10 insertions(+), 13 deletions(-) delete mode 100644 src/plugins/platforms/cocoa/images/copyarrowcursor.png delete mode 100644 src/plugins/platforms/cocoa/images/forbiddencursor.png diff --git a/src/plugins/platforms/cocoa/images/copyarrowcursor.png b/src/plugins/platforms/cocoa/images/copyarrowcursor.png deleted file mode 100644 index 13dfca95bcebbfcc6cce7e0c64bf2322e71b1a66..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1976 zcmV;p2S@mcP)P001Qj1^@s6w^2g10006dX+uL$Nkc;* zP;zf(X>4Tx0C=30l0j<|Q4q&}FF{gJgV?B0JnX@WLX;&z2qKa;*-F|Hmu#9Q@gT`= znnaV$vf0Ecf(5}(Ac7t})E;_|H|x!d2T?TCFW}i?QKZDfx*HHeap1vkhIupd{_`OC zvtn7T0MIraJ9lGVDwfJpXow)h2@+hb=v`}0RhOA)`=1d2A1_rbtM%g6_u;jtyX9X$ zHeNmIym>PD9spsxSSo{v0+G7QNgz^nIS)kcIhF&W0Yvmh#Q^aTh}!vF3d9x=uDkpi z2v=Qx2ZZ~2-2pKKWYcJx5SRiIMy;zuAPF>#uHJ^g7KlK*-7z4z4P4MI+kxOG;9Rj( zmfVro6L38X;_*0Ex&qrTVdnNYHrs?#vo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co|67D6AsnQ|Wntxhmw+L{@>SI}q2*G`G+Bwo*|>vS2&A+A4sEz@9_vm>hw8 zT5#=R7XVv!uO|?bgqDLDfv^dR>t?z_(%+{aVgseHNv~#8EdUvSfCBlk9;QoB5v`jY zOsyoX^`ONdUI|7BgaXorfKD&7eujSuTR`4WxUL%13&jaG9098W@+-hh&012tMiPvH z83ol~#zdqIs>OAD_TrDk0wyjW=hDu1dEO{vqfkH25R&idouQj&q4wYnc~GZlI0+$uv!&a;kzMmI(!ffS?J60cGXR4?>j?ECWSxAvWZ* zBr|E62HNNca$Y2UTk(pIywOCeZYyRuPE9CE$OwWFa3{C|BFi8g1tSQ$0lE&wNk&tB z{CMhpP6PeG_(BlRS}eeBZ(^vbj-nYMQofR9dJyyg1j-;_IsnZ8O^4I~odd1>aQZN3 zfLlNkr_kAOzd`y}SrM4-YG$zK8r{J#S=*wd>Zrjmx=^rkV~pPIrMvfcn$LgEcWr05 z>H zl-v#{a3(p=1Iq7%4m*m(Fc(L0000< KMNUMnLSTZmt(bTK diff --git a/src/plugins/platforms/cocoa/images/forbiddencursor.png b/src/plugins/platforms/cocoa/images/forbiddencursor.png deleted file mode 100644 index a9f21b4a5eb5e144c76a6e7de7d1520687e3847d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1745 zcmV;?1}^!DP)P001Ni1^@s6d<~Hh0006dX+uL$Nkc;* zP;zf(X>4Tx0C=30l0j<|Q4q&}FF{gJgV?B0JnX@WLX;&z2qKa;*-F|Hmu#9Q@gT`= znnaV$vf0Ecf(5}(Ac7t})E;_|H|x!d2T?TCFW}i?QKZDfx*HHeap1vkhIupd{_`OC zvtn7T0MIraJ9lGVDwfJpXow)h2@+hb=v`}0RhOA)`=1d2A1_rbtM%g6_u;jtyX9X$ zHeNmIym>PD9spsxSSo{v0+G7QNgz^nIS)kcIhF&W0Yvmh#Q^aTh}!vF3d9x=uDkpi z2v=Qx2ZZ~2-2pKKWYcJx5SRiIMy;zuAPF>#u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}VsS(p)I|oj>Z{U$}VK1^n#a;U!CzhvSWh5y100000NkvXXu0mjf;PgA2 diff --git a/src/plugins/platforms/cocoa/qcocoacursor.mm b/src/plugins/platforms/cocoa/qcocoacursor.mm index 3df2a7c962..99a136d384 100644 --- a/src/plugins/platforms/cocoa/qcocoacursor.mm +++ b/src/plugins/platforms/cocoa/qcocoacursor.mm @@ -97,6 +97,9 @@ NSCursor *QCocoaCursor::convertCursor(QCursor *cursor) case Qt::ArrowCursor: cocoaCursor= [NSCursor arrowCursor]; break; + case Qt::ForbiddenCursor: + cocoaCursor = [NSCursor operationNotAllowedCursor]; + break; case Qt::CrossCursor: cocoaCursor = [NSCursor crosshairCursor]; break; @@ -123,7 +126,7 @@ NSCursor *QCocoaCursor::convertCursor(QCursor *cursor) cocoaCursor = [NSCursor crosshairCursor]; break; case Qt::DragCopyCursor: - cocoaCursor = [NSCursor crosshairCursor]; + cocoaCursor = [NSCursor dragCopyCursor]; break; case Qt::DragLinkCursor: cocoaCursor = [NSCursor dragLinkCursor]; @@ -235,10 +238,6 @@ NSCursor *QCocoaCursor::createCursorData(QCursor *cursor) QPixmap pixmap = QPixmap(QLatin1String(":/qt-project.org/mac/cursors/images/waitcursor.png")); return createCursorFromPixmap(pixmap, hotspot); break; } - case Qt::ForbiddenCursor: { - QPixmap pixmap = QPixmap(QLatin1String(":/qt-project.org/mac/cursors/images/forbiddencursor.png")); - return createCursorFromPixmap(pixmap, hotspot); - break; } #define QT_USE_APPROXIMATE_CURSORS #ifdef QT_USE_APPROXIMATE_CURSORS case Qt::SizeVerCursor: diff --git a/src/plugins/platforms/cocoa/qcocoaresources.qrc b/src/plugins/platforms/cocoa/qcocoaresources.qrc index b06ab65ea8..1c4b941b9b 100644 --- a/src/plugins/platforms/cocoa/qcocoaresources.qrc +++ b/src/plugins/platforms/cocoa/qcocoaresources.qrc @@ -1,9 +1,7 @@ - - -images/copyarrowcursor.png -images/forbiddencursor.png -images/spincursor.png -images/waitcursor.png -images/sizeallcursor.png - + + + images/spincursor.png + images/waitcursor.png + images/sizeallcursor.png +