mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-23 08:44:01 +00:00
reduce compiler warnings (deprecated method, uninitialized vars)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34097 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
c720965eb9
commit
4b0a8f2dfb
@ -364,30 +364,27 @@ NSMutableDictionary* keyedLinkBacks = nil ;
|
||||
LinkBack* ret = [keyedLinkBacks objectForKey: aKey] ;
|
||||
|
||||
if(nil==ret) {
|
||||
BOOL ok ;
|
||||
NSString* serverName = nil ;
|
||||
NSString* serverId = nil ;
|
||||
NSString* appName = nil ;
|
||||
NSURL* url = nil ;
|
||||
BOOL ok = [data isKindOfClass: [NSDictionary class]] ;
|
||||
|
||||
// collect server contact information from data.
|
||||
ok = [data isKindOfClass: [NSDictionary class]] ;
|
||||
if (ok) {
|
||||
serverName = [data objectForKey: LinkBackServerNameKey] ;
|
||||
serverId = [data objectForKey: LinkBackServerBundleIdentifierKey];
|
||||
appName = [data linkBackSourceApplicationName] ;
|
||||
url = [data linkBackApplicationURL] ;
|
||||
}
|
||||
|
||||
if (!ok || !serverName || !serverId)
|
||||
[NSException raise: NSInvalidArgumentException format: @"LinkBackData is not of the correct format: %@", data] ;
|
||||
// collect server contact information from data.
|
||||
NSString* serverName = [data objectForKey: LinkBackServerNameKey] ;
|
||||
NSString* serverId = [data objectForKey: LinkBackServerBundleIdentifierKey];
|
||||
NSString* appName = [data linkBackSourceApplicationName] ;
|
||||
NSURL* url = [data linkBackApplicationURL] ;
|
||||
|
||||
// create the live link object and try to connect to the server.
|
||||
ret = [[LinkBack alloc] initClientWithSourceName: aName delegate: del itemKey: aKey] ;
|
||||
if ( !serverName || !serverId)
|
||||
[NSException raise: NSInvalidArgumentException format: @"LinkBackData is not of the correct format: %@", data] ;
|
||||
|
||||
// create the live link object and try to connect to the server.
|
||||
ret = [[LinkBack alloc] initClientWithSourceName: aName delegate: del itemKey: aKey] ;
|
||||
|
||||
if (![ret connectToServerWithName: serverName inApplication: serverId fallbackURL: url appName: appName]) {
|
||||
[ret release] ;
|
||||
ret = nil ;
|
||||
if (![ret connectToServerWithName: serverName inApplication: serverId fallbackURL: url appName: appName]) {
|
||||
[ret release] ;
|
||||
ret = nil ;
|
||||
}
|
||||
} else {
|
||||
[NSException raise: NSInvalidArgumentException format: @"LinkBackData is not of the correct format: %@", data] ;
|
||||
}
|
||||
}
|
||||
|
||||
@ -401,9 +398,6 @@ NSMutableDictionary* keyedLinkBacks = nil ;
|
||||
[ret requestEdit] ;
|
||||
|
||||
// if connection to server failed, return nil.
|
||||
} else {
|
||||
[ret release] ;
|
||||
ret = nil ;
|
||||
}
|
||||
|
||||
return ret ;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* \file LinkBackProxy.mm
|
||||
* \file LinkBackProxy.m
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
@ -195,7 +195,7 @@ int isLinkBackDataInPasteboard()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void getLinkBackData(void const * * buf, unsigned * len)
|
||||
{
|
||||
checkAutoReleasePool() ;
|
||||
@ -217,6 +217,7 @@ void getLinkBackData(void const * * buf, unsigned * len)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int editLinkBackFile(char const * docName)
|
||||
{
|
||||
// setup Obj-C and our client
|
||||
|
@ -94,7 +94,7 @@ NSString* FindLinkBackServer(NSString* bundleIdentifier, NSString* serverName, N
|
||||
NSString* ret = nil ;
|
||||
|
||||
NSFileManager* fm = [NSFileManager defaultManager] ;
|
||||
NSArray* contents = [fm directoryContentsAtPath: dir] ;
|
||||
NSArray* contents = [fm contentsOfDirectoryAtPath: dir error: nil] ;
|
||||
int idx ;
|
||||
|
||||
NSLog(@"searching for %@ in folder: %@", serverName, dir) ;
|
||||
|
Loading…
x
Reference in New Issue
Block a user