Fix deprecated NSURL to NSString conversion. (#2090)
clang warning: ``` 'stringByReplacingPercentEscapesUsingEncoding:' is deprecated: first deprecated in macOS 10.11 - Use -stringByRemovingPercentEncoding instead, which always uses the recommended UTF-8 encoding. [-Wdeprecated-declarations] ``` Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
655050ce70
commit
689063b305
|
@ -983,7 +983,7 @@ static void removeKeRangerRansomware()
|
||||||
NSString* message = [NSString
|
NSString* message = [NSString
|
||||||
stringWithFormat:NSLocalizedString(@"It appears that the file \"%@\" from %@ is not a torrent file.", "Download not a torrent -> message"),
|
stringWithFormat:NSLocalizedString(@"It appears that the file \"%@\" from %@ is not a torrent file.", "Download not a torrent -> message"),
|
||||||
suggestedName,
|
suggestedName,
|
||||||
[download.request.URL.absoluteString stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
|
[download.request.URL.absoluteString stringByRemovingPercentEncoding]];
|
||||||
|
|
||||||
NSAlert* alert = [[NSAlert alloc] init];
|
NSAlert* alert = [[NSAlert alloc] init];
|
||||||
[alert addButtonWithTitle:NSLocalizedString(@"OK", "Download not a torrent -> button")];
|
[alert addButtonWithTitle:NSLocalizedString(@"OK", "Download not a torrent -> button")];
|
||||||
|
@ -1008,7 +1008,7 @@ static void removeKeRangerRansomware()
|
||||||
{
|
{
|
||||||
NSString* message = [NSString
|
NSString* message = [NSString
|
||||||
stringWithFormat:NSLocalizedString(@"The torrent could not be downloaded from %@: %@.", "Torrent download failed -> message"),
|
stringWithFormat:NSLocalizedString(@"The torrent could not be downloaded from %@: %@.", "Torrent download failed -> message"),
|
||||||
[download.request.URL.absoluteString stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding],
|
[download.request.URL.absoluteString stringByRemovingPercentEncoding],
|
||||||
error.localizedDescription];
|
error.localizedDescription];
|
||||||
|
|
||||||
NSAlert* alert = [[NSAlert alloc] init];
|
NSAlert* alert = [[NSAlert alloc] init];
|
||||||
|
|
Loading…
Reference in New Issue