소스 검색

UI: Fix shadow-ivar warning on macOS

tytan652 3 년 전
부모
커밋
90c49c7af1
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      UI/platform-osx.mm

+ 3 - 3
UI/platform-osx.mm

@@ -207,7 +207,7 @@ void EnableOSXDockIcon(bool enable)
 
 @interface DockView : NSView {
 @private
-	QIcon icon;
+	QIcon _icon;
 }
 @end
 
@@ -215,7 +215,7 @@ void EnableOSXDockIcon(bool enable)
 - (id)initWithIcon:(QIcon)icon
 {
 	self = [super init];
-	self->icon = icon;
+	_icon = icon;
 	return self;
 }
 - (void)drawRect:(NSRect)dirtyRect
@@ -230,7 +230,7 @@ void EnableOSXDockIcon(bool enable)
 	/* Draw small icon on top */
 	float iconSize = 0.45;
 	CGImageRef image =
-		icon.pixmap(size.width, size.height).toImage().toCGImage();
+		_icon.pixmap(size.width, size.height).toImage().toCGImage();
 	CGContextRef context = [[NSGraphicsContext currentContext] CGContext];
 	CGContextDrawImage(context,
 			   CGRectMake(size.width * (1 - iconSize), 0,