summaryrefslogtreecommitdiff
path: root/apple_remote
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2012-05-08 00:03:53 +0300
committerTor Lillqvist <tml@iki.fi>2012-05-08 00:22:51 +0300
commitfbd82ae8835adf40930be35e7cf14ce812786224 (patch)
treef5f2bb127fe64a8cdc3b14670dff54c8003627ae /apple_remote
parent8701f5ef0591bdb7746f19fe94ba27632e983347 (diff)
Bin a line of apparently meaningless and wrong Mac OS X code
When LibreOffice is compiled against the 10.6 SDK and run under gdb, the apple_remote code caused "cannot init a class object" exception messages to be printed. Upon closer inspection this was caused by the call to [super init] in the sendDistributedNotification class method of the RemoteControl class. As far as I understand, calling [super init] and assigning its return value to self, even, is pointless and wrong in a class method. This code apparently has not been causing any harm when built against the 10.4 SDK. This is probably just accidental thanks to a more lenient Objective-C runtime getting used? When built against the 10.6 SDK, though, the resulting Objective-C exception seemed to make input event handling non-functional. After this fix LibreOffice built this way works better. Change-Id: I I I383611753f3f83a9efa4694b1900c8b66ed1a8e3
Diffstat (limited to 'apple_remote')
-rw-r--r--apple_remote/source/RemoteControl.m2
1 files changed, 0 insertions, 2 deletions
diff --git a/apple_remote/source/RemoteControl.m b/apple_remote/source/RemoteControl.m
index 49aacd4a5384..36f7ffecca2c 100644
--- a/apple_remote/source/RemoteControl.m
+++ b/apple_remote/source/RemoteControl.m
@@ -103,7 +103,6 @@ NSString* kTargetApplicationIdentifier = @"TargetBundleIdentifier";
+ (void) sendDistributedNotification: (NSString*) notificationName targetBundleIdentifier: (NSString*) targetIdentifier
{
- if ( (self = [super init]) ) {
NSDictionary* userInfo = [NSDictionary dictionaryWithObjectsAndKeys: [NSString stringWithCString:[self remoteControlDeviceName] encoding:NSASCIIStringEncoding],
kRemoteControlDeviceName /* key = RemoteControlDeviceName -> OK */,
[[NSBundle mainBundle] bundleIdentifier] /* value = org.openoffice.script -> OK */,
@@ -129,7 +128,6 @@ NSString* kTargetApplicationIdentifier = @"TargetBundleIdentifier";
object:nil
userInfo:userInfo
deliverImmediately:YES];
- }
}
+ (void) sendFinishedNotifcationForAppIdentifier: (NSString*) identifier {