Fixed `archivedDataWithRootObject:` is deprecated (#4310)
This commit is contained in:
parent
6f1153cae4
commit
84c0001e2f
|
@ -3724,7 +3724,8 @@ void onTorrentCompletenessChanged(tr_torrent* tor, tr_completeness status, bool
|
||||||
}
|
}
|
||||||
|
|
||||||
[pasteboard declareTypes:@[ kTorrentTableViewDataType ] owner:self];
|
[pasteboard declareTypes:@[ kTorrentTableViewDataType ] owner:self];
|
||||||
[pasteboard setData:[NSKeyedArchiver archivedDataWithRootObject:indexSet] forType:kTorrentTableViewDataType];
|
[pasteboard setData:[NSKeyedArchiver archivedDataWithRootObject:indexSet requiringSecureCoding:YES error:nil]
|
||||||
|
forType:kTorrentTableViewDataType];
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
return NO;
|
return NO;
|
||||||
|
|
|
@ -356,7 +356,9 @@ GroupsController* fGroupsInstance = nil;
|
||||||
[groups addObject:tempDict];
|
[groups addObject:tempDict];
|
||||||
}
|
}
|
||||||
|
|
||||||
[NSUserDefaults.standardUserDefaults setObject:[NSKeyedArchiver archivedDataWithRootObject:groups] forKey:@"GroupDicts"];
|
[NSUserDefaults.standardUserDefaults setObject:[NSKeyedArchiver archivedDataWithRootObject:groups requiringSecureCoding:YES
|
||||||
|
error:nil]
|
||||||
|
forKey:@"GroupDicts"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSImage*)imageForGroupNone
|
- (NSImage*)imageForGroupNone
|
||||||
|
|
|
@ -93,7 +93,8 @@ typedef NS_ENUM(NSInteger, SegmentTag) {
|
||||||
- (BOOL)tableView:(NSTableView*)tableView writeRowsWithIndexes:(NSIndexSet*)rowIndexes toPasteboard:(NSPasteboard*)pboard
|
- (BOOL)tableView:(NSTableView*)tableView writeRowsWithIndexes:(NSIndexSet*)rowIndexes toPasteboard:(NSPasteboard*)pboard
|
||||||
{
|
{
|
||||||
[pboard declareTypes:@[ kGroupTableViewDataType ] owner:self];
|
[pboard declareTypes:@[ kGroupTableViewDataType ] owner:self];
|
||||||
[pboard setData:[NSKeyedArchiver archivedDataWithRootObject:rowIndexes] forType:kGroupTableViewDataType];
|
[pboard setData:[NSKeyedArchiver archivedDataWithRootObject:rowIndexes requiringSecureCoding:YES error:nil]
|
||||||
|
forType:kGroupTableViewDataType];
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -156,7 +156,8 @@ static NSTimeInterval const kToggleProgressSeconds = 0.175;
|
||||||
|
|
||||||
- (void)saveCollapsedGroups
|
- (void)saveCollapsedGroups
|
||||||
{
|
{
|
||||||
[self.fDefaults setObject:[NSKeyedArchiver archivedDataWithRootObject:self.fCollapsedGroups] forKey:@"CollapsedGroupIndexes"];
|
[self.fDefaults setObject:[NSKeyedArchiver archivedDataWithRootObject:self.fCollapsedGroups requiringSecureCoding:YES error:nil]
|
||||||
|
forKey:@"CollapsedGroupIndexes"];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)outlineView:(NSOutlineView*)outlineView isGroupItem:(id)item
|
- (BOOL)outlineView:(NSOutlineView*)outlineView isGroupItem:(id)item
|
||||||
|
|
Loading…
Reference in New Issue