aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-03-08 10:46:29 +0100
committerLiang Qi <liang.qi@qt.io>2018-03-08 12:28:15 +0000
commitac1910ab4b54c4b4ef012d3373ed66ac7ea77f00 (patch)
tree057387241d1cc881076934072725d2bafb64d2e8
parentb3d31fb1d0f88f9a70fa3a525ff288ffad94bfe6 (diff)
Clean up our Objective-C usage
Following ba871065e0f40e9197fa4ee0ffe76530bb6fca11 in qtbase. - Move ivars into @implementation - Use instancetype where applicable Change-Id: I33be9b380e3bea6bd54be1d0bfd7e3e7072fc82a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-rw-r--r--src/plugins/gamepads/darwin/qdarwingamepadbackend.mm16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/plugins/gamepads/darwin/qdarwingamepadbackend.mm b/src/plugins/gamepads/darwin/qdarwingamepadbackend.mm
index 1298c00..5c07271 100644
--- a/src/plugins/gamepads/darwin/qdarwingamepadbackend.mm
+++ b/src/plugins/gamepads/darwin/qdarwingamepadbackend.mm
@@ -40,23 +40,21 @@
#import <GameController/GameController.h>
@interface QT_MANGLE_NAMESPACE(DarwinGamepadManager) : NSObject
-{
- QDarwinGamepadBackend *backend;
- NSMutableArray *connectedControllers;
-}
@property (nonatomic, strong) id connectObserver;
@property (nonatomic, strong) id disconnectObserver;
--(void)addMonitoredController:(GCController *)controller;
--(void)removeMonitoredController:(GCController *)controller;
-
@end
@implementation QT_MANGLE_NAMESPACE(DarwinGamepadManager)
+{
+ QDarwinGamepadBackend *backend;
+ NSMutableArray *connectedControllers;
+}
--(id)initWithBackend:(QDarwinGamepadBackend *)gamepadBackend {
- if (self = [super init]) {
+-(instancetype)initWithBackend:(QDarwinGamepadBackend *)gamepadBackend
+{
+ if ((self = [self init])) {
backend = gamepadBackend;
connectedControllers = [[NSMutableArray alloc] init];
//Setup observers for monitoring controller connections/disconnections