Skip to content
Permalink
Browse files

fix QtMac::toNSImage being deprecated

  • Loading branch information
3nids committed Sep 21, 2020
1 parent 1c1febc commit 25664587fd2b3441ba28c4b5ed5c128fb8669570
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/native/mac/qgsmacnative.mm
@@ -60,7 +60,10 @@ - ( BOOL )userNotificationCenter:( NSUserNotificationCenter * )center shouldPres

void QgsMacNative::setIconPath( const QString &iconPath )
{
mQgsUserNotificationCenter->_qgisIcon = QtMac::toNSImage( QPixmap( iconPath ) );
QImage image = QPixmap( iconPath ).toImage();
CGImageRef imgRef = image.toCGImage();
NSSize nsize = NSMakeSize((CGFloat)image.size().width(), (CGFloat)image.size().height());
mQgsUserNotificationCenter->_qgisIcon = [[NSImage alloc] initWithCGImage:imgRef size:nsize];
}

const char *QgsMacNative::currentAppLocalizedName()

0 comments on commit 2566458

Please sign in to comment.
You can’t perform that action at this time.