iOS: Clean up style in Objective-C message signatures
- Space between class/instance signifier - No space between return type and message name - No space in message arguments Change-Id: Ie25e0be3c134586c44bb82bf7075f6eb153388a9 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
This commit is contained in:
parent
66050f2ac8
commit
5926d7422e
@ -43,7 +43,7 @@
|
||||
|
||||
@implementation QIOSApplicationStateListener
|
||||
|
||||
- (id) init
|
||||
- (id)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
@ -75,7 +75,7 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
- (void)dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
removeObserver:self
|
||||
@ -92,12 +92,12 @@
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) applicationDidBecomeActive
|
||||
- (void)applicationDidBecomeActive
|
||||
{
|
||||
[self handleApplicationStateChanged:UIApplicationStateActive];
|
||||
}
|
||||
|
||||
- (void) applicationWillResignActive
|
||||
- (void)applicationWillResignActive
|
||||
{
|
||||
// Note that UIApplication is still UIApplicationStateActive at this
|
||||
// point, but since there is no separate notification for the inactive
|
||||
@ -105,12 +105,12 @@
|
||||
[self handleApplicationStateChanged:UIApplicationStateInactive];
|
||||
}
|
||||
|
||||
- (void) applicationDidEnterBackground
|
||||
- (void)applicationDidEnterBackground
|
||||
{
|
||||
[self handleApplicationStateChanged:UIApplicationStateBackground];
|
||||
}
|
||||
|
||||
- (void) handleApplicationStateChanged:(UIApplicationState) uiApplicationState
|
||||
- (void)handleApplicationStateChanged:(UIApplicationState)uiApplicationState
|
||||
{
|
||||
// We may receive application state changes after QCoreApplication has
|
||||
// gone down, as the block we schedule on the main queue keeps the
|
||||
|
@ -62,7 +62,7 @@
|
||||
|
||||
@implementation QUIClipboard
|
||||
|
||||
-(id)initWithQIOSClipboard:(QIOSClipboard *)qiosClipboard
|
||||
- (id)initWithQIOSClipboard:(QIOSClipboard *)qiosClipboard
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
@ -87,7 +87,7 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)dealloc
|
||||
- (void)dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
removeObserver:self
|
||||
|
@ -293,7 +293,7 @@ static bool rootLevelRunLoopIntegration()
|
||||
|
||||
@implementation QIOSApplicationStateTracker
|
||||
|
||||
+ (void) load
|
||||
+ (void)load
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver:self
|
||||
@ -323,7 +323,7 @@ static bool rootLevelRunLoopIntegration()
|
||||
# error "Unknown processor family"
|
||||
#endif
|
||||
|
||||
+ (void) applicationDidFinishLaunching
|
||||
+ (void)applicationDidFinishLaunching
|
||||
{
|
||||
if (!isQtApplication())
|
||||
return;
|
||||
@ -377,7 +377,7 @@ static bool rootLevelRunLoopIntegration()
|
||||
// four bits of the exit code (exit(3) will only pass on the lower 8 bits).
|
||||
static const char kApplicationWillTerminateExitCode = SIGTERM | 0x80;
|
||||
|
||||
+ (void) applicationWillTerminate
|
||||
+ (void)applicationWillTerminate
|
||||
{
|
||||
if (!isQtApplication())
|
||||
return;
|
||||
|
@ -68,7 +68,7 @@ int infoPlistValue(NSString* key, int defaultValue);
|
||||
QT_END_NAMESPACE
|
||||
|
||||
@interface UIResponder (QtFirstResponder)
|
||||
+(id)currentFirstResponder;
|
||||
+ (id)currentFirstResponder;
|
||||
@end
|
||||
|
||||
class FirstResponderCandidate : public QScopedValueRollback<UIResponder *>
|
||||
|
@ -133,7 +133,7 @@ int infoPlistValue(NSString* key, int defaultValue)
|
||||
@end
|
||||
|
||||
@implementation QtFirstResponderEvent
|
||||
- (void) dealloc
|
||||
- (void)dealloc
|
||||
{
|
||||
self.firstResponder = 0;
|
||||
[super dealloc];
|
||||
@ -158,7 +158,7 @@ int infoPlistValue(NSString* key, int defaultValue)
|
||||
|
||||
@implementation UIResponder (QtFirstResponder)
|
||||
|
||||
+(id)currentFirstResponder
|
||||
+ (id)currentFirstResponder
|
||||
{
|
||||
QtFirstResponderEvent *event = [[[QtFirstResponderEvent alloc] init] autorelease];
|
||||
[[UIApplication sharedApplication] sendAction:@selector(qt_findFirstResponder:event:) to:nil from:nil forEvent:event];
|
||||
|
@ -165,7 +165,7 @@ static NSString *const kSelectorPrefix = @"_qtMenuItem_";
|
||||
[self reloadAllComponents];
|
||||
}
|
||||
|
||||
-(void)listenForKeyboardWillHideNotification:(BOOL)listen
|
||||
- (void)listenForKeyboardWillHideNotification:(BOOL)listen
|
||||
{
|
||||
if (listen) {
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
@ -179,7 +179,7 @@ static NSString *const kSelectorPrefix = @"_qtMenuItem_";
|
||||
}
|
||||
}
|
||||
|
||||
-(void)dealloc
|
||||
- (void)dealloc
|
||||
{
|
||||
[self listenForKeyboardWillHideNotification:NO];
|
||||
self.toolbar = 0;
|
||||
|
@ -104,12 +104,12 @@ static QIOSScreen* qtPlatformScreenFor(UIScreen *uiScreen)
|
||||
@public
|
||||
QIOSScreen *m_screen;
|
||||
}
|
||||
- (id) initWithQIOSScreen:(QIOSScreen *)screen;
|
||||
- (id)initWithQIOSScreen:(QIOSScreen *)screen;
|
||||
@end
|
||||
|
||||
@implementation QIOSOrientationListener
|
||||
|
||||
- (id) initWithQIOSScreen:(QIOSScreen *)screen
|
||||
- (id)initWithQIOSScreen:(QIOSScreen *)screen
|
||||
{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
@ -123,7 +123,7 @@ static QIOSScreen* qtPlatformScreenFor(UIScreen *uiScreen)
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
- (void)dealloc
|
||||
{
|
||||
[[UIDevice currentDevice] endGeneratingDeviceOrientationNotifications];
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
@ -132,7 +132,7 @@ static QIOSScreen* qtPlatformScreenFor(UIScreen *uiScreen)
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) orientationChanged:(NSNotification *)notification
|
||||
- (void)orientationChanged:(NSNotification *)notification
|
||||
{
|
||||
Q_UNUSED(notification);
|
||||
m_screen->updateProperties();
|
||||
|
@ -92,12 +92,12 @@
|
||||
return [QUITextPosition positionWithIndex:(self.range.location + self.range.length)];
|
||||
}
|
||||
|
||||
- (NSRange) range
|
||||
- (NSRange)range
|
||||
{
|
||||
return _range;
|
||||
}
|
||||
|
||||
-(BOOL)isEmpty
|
||||
- (BOOL)isEmpty
|
||||
{
|
||||
return (self.range.length == 0);
|
||||
}
|
||||
@ -111,7 +111,7 @@
|
||||
|
||||
@implementation WrapperView
|
||||
|
||||
-(id)initWithView:(UIView *)view
|
||||
- (id)initWithView:(UIView *)view
|
||||
{
|
||||
if (self = [self init]) {
|
||||
[self addSubview:view];
|
||||
@ -143,7 +143,7 @@
|
||||
// retained, we ensure that all messages sent to the view during
|
||||
// its lifetime in a window hierarcy will be able to traverse the
|
||||
// responder chain.
|
||||
-(void)willMoveToWindow:(UIWindow *)window
|
||||
- (void)willMoveToWindow:(UIWindow *)window
|
||||
{
|
||||
if (window)
|
||||
[[self nextResponder] retain];
|
||||
@ -383,17 +383,17 @@
|
||||
return m_inputContext->imeState().currentState.value(query);
|
||||
}
|
||||
|
||||
-(id<UITextInputTokenizer>)tokenizer
|
||||
- (id<UITextInputTokenizer>)tokenizer
|
||||
{
|
||||
return [[[UITextInputStringTokenizer alloc] initWithTextInput:id<UITextInput>(self)] autorelease];
|
||||
}
|
||||
|
||||
-(UITextPosition *)beginningOfDocument
|
||||
- (UITextPosition *)beginningOfDocument
|
||||
{
|
||||
return [QUITextPosition positionWithIndex:0];
|
||||
}
|
||||
|
||||
-(UITextPosition *)endOfDocument
|
||||
- (UITextPosition *)endOfDocument
|
||||
{
|
||||
int endPosition = [self currentImeState:Qt::ImSurroundingText].toString().length();
|
||||
return [QUITextPosition positionWithIndex:endPosition];
|
||||
@ -659,7 +659,7 @@
|
||||
return [NSDictionary dictionaryWithObject:uifont forKey:UITextInputTextFontKey];
|
||||
}
|
||||
|
||||
-(NSDictionary *)markedTextStyle
|
||||
- (NSDictionary *)markedTextStyle
|
||||
{
|
||||
return [NSDictionary dictionary];
|
||||
}
|
||||
|
@ -288,13 +288,13 @@
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
-(BOOL)shouldAutorotate
|
||||
- (BOOL)shouldAutorotate
|
||||
{
|
||||
return m_screen && m_screen->uiScreen() == [UIScreen mainScreen] && !self.lockedOrientation;
|
||||
}
|
||||
|
||||
#if QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_6_0)
|
||||
-(NSUInteger)supportedInterfaceOrientations
|
||||
- (NSUInteger)supportedInterfaceOrientations
|
||||
{
|
||||
// As documented by Apple in the iOS 6.0 release notes, setStatusBarOrientation:animated:
|
||||
// only works if the supportedInterfaceOrientations of the view controller is 0, making
|
||||
@ -307,7 +307,7 @@
|
||||
#endif
|
||||
|
||||
#if QT_IOS_DEPLOYMENT_TARGET_BELOW(__IPHONE_6_0)
|
||||
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
|
||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
|
||||
{
|
||||
Q_UNUSED(interfaceOrientation);
|
||||
return [self shouldAutorotate];
|
||||
|
@ -42,8 +42,8 @@
|
||||
|
||||
@property (readonly) QAccessible::Id axid;
|
||||
|
||||
- (id) initWithId: (QAccessible::Id) anId withAccessibilityContainer: (id) view;
|
||||
+ (QMacAccessibilityElement *) elementWithId: (QAccessible::Id) anId withAccessibilityContainer: (id) view;
|
||||
- (id)initWithId:(QAccessible::Id)anId withAccessibilityContainer:(id)view;
|
||||
+ (QMacAccessibilityElement *)elementWithId:(QAccessible::Id)anId withAccessibilityContainer:(id)view;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
||||
|
||||
@implementation QMacAccessibilityElement
|
||||
|
||||
- (id) initWithId: (QAccessible::Id) anId withAccessibilityContainer: (id) view
|
||||
- (id)initWithId:(QAccessible::Id)anId withAccessibilityContainer:(id)view
|
||||
{
|
||||
Q_ASSERT((int)anId < 0);
|
||||
self = [super initWithAccessibilityContainer: view];
|
||||
@ -47,7 +47,7 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
+ (id) elementWithId: (QAccessible::Id) anId withAccessibilityContainer: (id) view
|
||||
+ (id)elementWithId:(QAccessible::Id)anId withAccessibilityContainer:(id)view
|
||||
{
|
||||
Q_ASSERT(anId);
|
||||
if (!anId)
|
||||
@ -64,17 +64,17 @@
|
||||
return element;
|
||||
}
|
||||
|
||||
- (void) invalidate
|
||||
- (void)invalidate
|
||||
{
|
||||
[self release];
|
||||
}
|
||||
|
||||
- (BOOL) isAccessibilityElement
|
||||
- (BOOL)isAccessibilityElement
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (NSString*) accessibilityLabel
|
||||
- (NSString*)accessibilityLabel
|
||||
{
|
||||
QAccessibleInterface *iface = QAccessible::accessibleInterface(self.axid);
|
||||
if (!iface) {
|
||||
@ -85,7 +85,7 @@
|
||||
return iface->text(QAccessible::Name).toNSString();
|
||||
}
|
||||
|
||||
- (NSString*) accessibilityHint
|
||||
- (NSString*)accessibilityHint
|
||||
{
|
||||
QAccessibleInterface *iface = QAccessible::accessibleInterface(self.axid);
|
||||
if (!iface) {
|
||||
@ -95,7 +95,7 @@
|
||||
return iface->text(QAccessible::Description).toNSString();
|
||||
}
|
||||
|
||||
- (NSString*) accessibilityValue
|
||||
- (NSString*)accessibilityValue
|
||||
{
|
||||
QAccessibleInterface *iface = QAccessible::accessibleInterface(self.axid);
|
||||
if (!iface) {
|
||||
@ -119,7 +119,7 @@
|
||||
return [super accessibilityHint];
|
||||
}
|
||||
|
||||
- (CGRect) accessibilityFrame
|
||||
- (CGRect)accessibilityFrame
|
||||
{
|
||||
QAccessibleInterface *iface = QAccessible::accessibleInterface(self.axid);
|
||||
if (!iface) {
|
||||
@ -131,7 +131,7 @@
|
||||
return CGRectMake(rect.x(), rect.y(), rect.width(), rect.height());
|
||||
}
|
||||
|
||||
- (UIAccessibilityTraits) accessibilityTraits
|
||||
- (UIAccessibilityTraits)accessibilityTraits
|
||||
{
|
||||
UIAccessibilityTraits traits = UIAccessibilityTraitNone;
|
||||
|
||||
@ -156,7 +156,7 @@
|
||||
return traits;
|
||||
}
|
||||
|
||||
- (BOOL) accessibilityActivate
|
||||
- (BOOL)accessibilityActivate
|
||||
{
|
||||
QAccessibleInterface *iface = QAccessible::accessibleInterface(self.axid);
|
||||
if (QAccessibleActionInterface *action = iface->actionInterface()) {
|
||||
@ -171,21 +171,21 @@
|
||||
return NO; // fall back to sending mouse clicks
|
||||
}
|
||||
|
||||
- (void) accessibilityIncrement
|
||||
- (void)accessibilityIncrement
|
||||
{
|
||||
QAccessibleInterface *iface = QAccessible::accessibleInterface(self.axid);
|
||||
if (QAccessibleActionInterface *action = iface->actionInterface())
|
||||
action->doAction(QAccessibleActionInterface::increaseAction());
|
||||
}
|
||||
|
||||
- (void) accessibilityDecrement
|
||||
- (void)accessibilityDecrement
|
||||
{
|
||||
QAccessibleInterface *iface = QAccessible::accessibleInterface(self.axid);
|
||||
if (QAccessibleActionInterface *action = iface->actionInterface())
|
||||
action->doAction(QAccessibleActionInterface::decreaseAction());
|
||||
}
|
||||
|
||||
- (BOOL) accessibilityScroll : (UIAccessibilityScrollDirection) direction
|
||||
- (BOOL)accessibilityScroll:(UIAccessibilityScrollDirection)direction
|
||||
{
|
||||
QAccessibleInterface *iface = QAccessible::accessibleInterface(self.axid);
|
||||
QAccessibleActionInterface *action = iface->actionInterface();
|
||||
|
@ -50,7 +50,7 @@
|
||||
return [CAEAGLLayer class];
|
||||
}
|
||||
|
||||
-(id)initWithQIOSWindow:(QIOSWindow *)window
|
||||
- (id)initWithQIOSWindow:(QIOSWindow *)window
|
||||
{
|
||||
if (self = [self initWithFrame:toCGRect(window->geometry())])
|
||||
m_qioswindow = window;
|
||||
@ -310,7 +310,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void) sendTouchEventWithTimestamp:(ulong)timeStamp
|
||||
- (void)sendTouchEventWithTimestamp:(ulong)timeStamp
|
||||
{
|
||||
// Send touch event synchronously
|
||||
QIOSIntegration *iosIntegration = QIOSIntegration::instance();
|
||||
|
Loading…
x
Reference in New Issue
Block a user