mirror of
https://github.com/QuasarApp/macdependency.git
synced 2025-04-26 20:34:31 +00:00
fix warnings: use fileURL instead of deprecated filename
This commit is contained in:
parent
05556aed6e
commit
6e5aefeafe
@ -85,10 +85,10 @@
|
||||
// TODO: detect changes on document file (FSEvents) or alternatively make reload possible
|
||||
|
||||
// load file
|
||||
NSString* file = [super fileName];
|
||||
NSString* filePath = [absoluteURL path];
|
||||
|
||||
// convert to std:string
|
||||
std::string fileString = [file stdString];
|
||||
std::string fileString = [filePath stdString];
|
||||
try {
|
||||
machO = cache->getFile(fileString, NULL);
|
||||
} catch (MachOException& exc) {
|
||||
@ -167,7 +167,8 @@
|
||||
|
||||
- (NSString*) workingDirectory {
|
||||
// don't release the returned string!!, apparently then filename is released also
|
||||
return [[super fileName] stringByDeletingLastPathComponent];
|
||||
NSString* filePath = [[super fileURL] path];
|
||||
return [filePath stringByDeletingLastPathComponent];
|
||||
}
|
||||
|
||||
|
||||
@ -190,7 +191,7 @@
|
||||
NSString* token = [enumerator nextObject];
|
||||
if (token) {
|
||||
indexPath = [NSIndexPath indexPathWithIndex:[token intValue]];
|
||||
while (token = [enumerator nextObject]) {
|
||||
while ((token = [enumerator nextObject])) {
|
||||
if ([token length] > 0)
|
||||
indexPath = [indexPath indexPathByAddingIndex:[token intValue]];
|
||||
}
|
||||
|
@ -15,7 +15,8 @@
|
||||
@implementation SymbolTableEntryModel
|
||||
|
||||
- (id) initWithEntry:(const SymbolTableEntry*)anEntry demangleNamesPtr:(BOOL*)demangleNames document:(MyDocument*)aDocument {
|
||||
if (self = [super init]) {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
entry = anEntry;
|
||||
self->demangleNames = demangleNames;
|
||||
document = aDocument;
|
||||
|
Loading…
x
Reference in New Issue
Block a user