From 47a0e76cb3d508c1970b83e34ace0db741f929a4 Mon Sep 17 00:00:00 2001 From: relikd Date: Fri, 17 Jan 2020 12:19:08 +0100 Subject: [PATCH] NS_ASSUME_NONNULL --- baRSS.xcodeproj/xcshareddata/xcschemes/baRSS.xcscheme | 10 +++------- baRSS/Core Data/Feed+Ext.h | 4 ++++ baRSS/Core Data/FeedArticle+Ext.h | 4 ++++ baRSS/Core Data/FeedGroup+Ext.h | 5 ++++- baRSS/Core Data/FeedGroup+Ext.m | 2 +- baRSS/Core Data/FeedMeta+Ext.h | 4 ++++ baRSS/Core Data/NSFetchRequest+Ext.h | 4 ++++ baRSS/Core Data/StoreCoordinator.h | 6 +++++- baRSS/Core Data/StoreCoordinator.m | 2 +- baRSS/Feed Import/Download3rdParty.h | 4 ++++ baRSS/Feed Import/FaviconDownload.h | 4 ++++ baRSS/Feed Import/FeedDownload.h | 4 ++++ baRSS/Feed Import/OpmlFile.h | 4 ++++ baRSS/Feed Import/UpdateScheduler.h | 4 ++++ baRSS/Info.plist | 2 +- baRSS/NSCategories/NSDate+Ext.h | 4 ++++ baRSS/NSCategories/NSError+Ext.h | 4 ++++ baRSS/NSCategories/NSString+Ext.h | 4 ++++ baRSS/NSCategories/NSURL+Ext.h | 4 ++++ baRSS/NSCategories/NSURLRequest+Ext.h | 4 ++++ baRSS/NSCategories/NSView+Ext.h | 8 ++++++-- baRSS/NSCategories/NSView+Ext.m | 4 ++-- baRSS/Preferences/Appearance Tab/SettingsAppearance.h | 4 ++++ baRSS/Preferences/Feeds Tab/ModalFeedEdit.h | 3 +++ baRSS/Preferences/Feeds Tab/ModalFeedEditView.h | 4 ++++ baRSS/Preferences/Feeds Tab/RefreshStatisticsView.h | 4 ++++ baRSS/Preferences/Feeds Tab/SettingsFeeds+DragDrop.h | 4 ++++ baRSS/Preferences/Feeds Tab/SettingsFeeds.h | 6 +++++- baRSS/Preferences/Feeds Tab/SettingsFeedsView.h | 4 ++++ baRSS/Preferences/General Tab/SettingsGeneral.h | 4 ++++ baRSS/Preferences/General Tab/SettingsGeneralView.h | 3 +++ baRSS/Preferences/ModalSheet.h | 4 ++++ baRSS/Preferences/Preferences.h | 4 ++++ baRSS/Status Bar Menu/BarMenu.h | 4 ++++ baRSS/Status Bar Menu/BarStatusItem.h | 3 +++ baRSS/Status Bar Menu/MapUnreadTotal.h | 4 ++++ baRSS/Status Bar Menu/NSMenu+Ext.h | 4 ++++ 37 files changed, 137 insertions(+), 17 deletions(-) diff --git a/baRSS.xcodeproj/xcshareddata/xcschemes/baRSS.xcscheme b/baRSS.xcodeproj/xcshareddata/xcschemes/baRSS.xcscheme index 3bc194c..07890df 100644 --- a/baRSS.xcodeproj/xcshareddata/xcschemes/baRSS.xcscheme +++ b/baRSS.xcodeproj/xcshareddata/xcschemes/baRSS.xcscheme @@ -27,8 +27,6 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> - - - - + + - - *)sortedArticles; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/Core Data/FeedArticle+Ext.h b/baRSS/Core Data/FeedArticle+Ext.h index 115cd28..8f880a3 100644 --- a/baRSS/Core Data/FeedArticle+Ext.h +++ b/baRSS/Core Data/FeedArticle+Ext.h @@ -24,7 +24,11 @@ #import "FeedArticle+CoreDataClass.h" @class RSParsedArticle; +NS_ASSUME_NONNULL_BEGIN + @interface FeedArticle (Ext) + (instancetype)newArticle:(RSParsedArticle*)entry inContext:(NSManagedObjectContext*)moc; - (NSMenuItem*)newMenuItem; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/Core Data/FeedGroup+Ext.h b/baRSS/Core Data/FeedGroup+Ext.h index 717de6d..6dddf0f 100644 --- a/baRSS/Core Data/FeedGroup+Ext.h +++ b/baRSS/Core Data/FeedGroup+Ext.h @@ -29,6 +29,7 @@ typedef NS_ENUM(int16_t, FeedGroupType) { GROUP = 0, FEED = 1, SEPARATOR = 2 }; +NS_ASSUME_NONNULL_BEGIN @interface FeedGroup (Ext) /// Overwrites @c type attribute with enum. Use one of: @c GROUP, @c FEED, @c SEPARATOR. @@ -39,7 +40,7 @@ typedef NS_ENUM(int16_t, FeedGroupType) { + (instancetype)newGroup:(FeedGroupType)type inContext:(NSManagedObjectContext*)context; + (instancetype)appendToRoot:(FeedGroupType)type inContext:(NSManagedObjectContext*)moc; -- (void)setParent:(FeedGroup *)parent andSortIndex:(int32_t)sortIndex; +- (void)setParent:(nullable FeedGroup *)parent andSortIndex:(int32_t)sortIndex; - (void)setSortIndexIfChanged:(int32_t)sortIndex; - (void)setNameIfChanged:(nullable NSString*)name; - (NSMenuItem*)newMenuItem; @@ -50,3 +51,5 @@ typedef NS_ENUM(int16_t, FeedGroupType) { // Printing - (NSString*)readableDescription; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/Core Data/FeedGroup+Ext.m b/baRSS/Core Data/FeedGroup+Ext.m index 67224d7..2ad6358 100644 --- a/baRSS/Core Data/FeedGroup+Ext.m +++ b/baRSS/Core Data/FeedGroup+Ext.m @@ -78,7 +78,7 @@ } /// Set @c parent and @c sortIndex. Also if type is @c FEED calculate and set @c indexPath string. -- (void)setParent:(FeedGroup *)parent andSortIndex:(int32_t)sortIndex { +- (void)setParent:(nullable FeedGroup *)parent andSortIndex:(int32_t)sortIndex { self.parent = parent; self.sortIndex = sortIndex; if (self.type == FEED) diff --git a/baRSS/Core Data/FeedMeta+Ext.h b/baRSS/Core Data/FeedMeta+Ext.h index 1c49994..165e807 100644 --- a/baRSS/Core Data/FeedMeta+Ext.h +++ b/baRSS/Core Data/FeedMeta+Ext.h @@ -25,6 +25,8 @@ static int32_t const kDefaultFeedRefreshInterval = 30 * 60; +NS_ASSUME_NONNULL_BEGIN + @interface FeedMeta (Ext) + (instancetype)newMetaInContext:(NSManagedObjectContext*)moc; // HTTP response @@ -35,3 +37,5 @@ static int32_t const kDefaultFeedRefreshInterval = 30 * 60; - (void)setRefreshIfChanged:(int32_t)refresh; - (void)scheduleNow:(NSTimeInterval)future; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/Core Data/NSFetchRequest+Ext.h b/baRSS/Core Data/NSFetchRequest+Ext.h index 7567006..b9b06d5 100644 --- a/baRSS/Core Data/NSFetchRequest+Ext.h +++ b/baRSS/Core Data/NSFetchRequest+Ext.h @@ -22,6 +22,8 @@ @import Cocoa; +NS_ASSUME_NONNULL_BEGIN + @interface NSFetchRequest (Ext) // Perform core data request and fetch data - (NSArray*)fetchAllRows:(NSManagedObjectContext*)moc; @@ -37,3 +39,5 @@ - (instancetype)sortDESC:(NSString*)key; // add .sortDescriptors -> ascending:NO - (instancetype)addFunctionExpression:(NSString*)fn onKeyPath:(NSString*)keyPath name:(NSString*)name type:(NSAttributeType)type; // add .propertiesToFetch -> (expressionForFunction:@[expressionForKeyPath:]) @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/Core Data/StoreCoordinator.h b/baRSS/Core Data/StoreCoordinator.h index 7441ba9..2d599c2 100644 --- a/baRSS/Core Data/StoreCoordinator.h +++ b/baRSS/Core Data/StoreCoordinator.h @@ -23,6 +23,8 @@ @import Cocoa; #import "DBv1+CoreDataModel.h" +NS_ASSUME_NONNULL_BEGIN + @interface StoreCoordinator : NSObject // Managing contexts + (NSManagedObjectContext*)getMainContext; @@ -44,7 +46,7 @@ + (NSArray*)countAggregatedUnread; // Get List Of Elements -+ (NSArray*)sortedFeedGroupsWithParent:(id)parent inContext:(nullable NSManagedObjectContext*)moc; ++ (NSArray*)sortedFeedGroupsWithParent:(nullable id)parent inContext:(nullable NSManagedObjectContext*)moc; + (Feed*)feedWithIndexPath:(nonnull NSString*)path inContext:(nullable NSManagedObjectContext*)moc; + (NSString*)urlForFeedWithIndexPath:(nonnull NSString*)path; @@ -55,3 +57,5 @@ + (void)cleanupAndShowAlert:(BOOL)flag; + (NSUInteger)cleanupFavicons; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/Core Data/StoreCoordinator.m b/baRSS/Core Data/StoreCoordinator.m index 69f65ac..5b241a1 100644 --- a/baRSS/Core Data/StoreCoordinator.m +++ b/baRSS/Core Data/StoreCoordinator.m @@ -144,7 +144,7 @@ @param moc If @c nil perform requests on main context (ok for reading). @return Sorted list of @c FeedGroup items where @c FeedGroup.parent @c = @c parent. */ -+ (NSArray*)sortedFeedGroupsWithParent:(id)parent inContext:(nullable NSManagedObjectContext*)moc { ++ (NSArray*)sortedFeedGroupsWithParent:(nullable id)parent inContext:(nullable NSManagedObjectContext*)moc { return [[[[FeedGroup fetchRequest] where:@"parent = %@", parent] sortASC:@"sortIndex"] fetchAllRows:moc ? moc : [self getMainContext]]; } diff --git a/baRSS/Feed Import/Download3rdParty.h b/baRSS/Feed Import/Download3rdParty.h index ba3248d..518aaa8 100644 --- a/baRSS/Feed Import/Download3rdParty.h +++ b/baRSS/Feed Import/Download3rdParty.h @@ -24,9 +24,13 @@ #define ENV_LOG_YOUTUBE 1 +NS_ASSUME_NONNULL_BEGIN + // TODO: Make plugins extensible? community extensions. @interface YouTubePlugin : NSObject + (NSString*)feedURL:(NSURL*)url; + (NSString*)videoImage:(NSString*)videoid; + (NSString*)videoImageHQ:(NSString*)videoid; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/Feed Import/FaviconDownload.h b/baRSS/Feed Import/FaviconDownload.h index 1d1075d..34cf225 100644 --- a/baRSS/Feed Import/FaviconDownload.h +++ b/baRSS/Feed Import/FaviconDownload.h @@ -24,6 +24,8 @@ @class Feed, RSHTMLMetadata, FeedDownload; @protocol FaviconDownloadDelegate; +NS_ASSUME_NONNULL_BEGIN + @interface FaviconDownload : NSObject /// @c img and @c path are @c nil if image is not valid or couldn't be downloaded. typedef void(^FaviconDownloadBlock)(NSImage * _Nullable img, NSURL * _Nullable path); @@ -45,3 +47,5 @@ typedef void(^FaviconDownloadBlock)(NSImage * _Nullable img, NSURL * _Nullable p /// Called after image download. Called on error, but not if download is cancled. - (void)faviconDownload:(FaviconDownload*)sender didFinish:(nullable NSURL*)path; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/Feed Import/FeedDownload.h b/baRSS/Feed Import/FeedDownload.h index 0b38a76..29b5cf6 100644 --- a/baRSS/Feed Import/FeedDownload.h +++ b/baRSS/Feed Import/FeedDownload.h @@ -24,6 +24,8 @@ @class RSParsedFeed, RSHTMLMetadataFeedLink, Feed, FaviconDownload; @protocol FeedDownloadDelegate; +NS_ASSUME_NONNULL_BEGIN + /** All properties will be parsed and stored in local variables. This will avoid unnecessary core data operations if user decides to cancel the edit. @@ -61,3 +63,5 @@ typedef void (^FeedDownloadBlock)(FeedDownload *sender); /// Called after xml data is loaded and parsed. Called on error, but not if download is cancled. - (void)feedDownloadDidFinish:(FeedDownload*)sender; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/Feed Import/OpmlFile.h b/baRSS/Feed Import/OpmlFile.h index 1fa4fe6..14d9b5e 100644 --- a/baRSS/Feed Import/OpmlFile.h +++ b/baRSS/Feed Import/OpmlFile.h @@ -28,6 +28,8 @@ typedef NS_OPTIONS(NSUInteger, OpmlFileExportOptions) { OpmlFileExportOptionFullBackup = 1 << 2, }; +NS_ASSUME_NONNULL_BEGIN + #pragma mark - Protocols @protocol OpmlFileImportDelegate @@ -61,3 +63,5 @@ typedef NS_OPTIONS(NSUInteger, OpmlFileExportOptions) { - (void)showExportDialog:(NSWindow*)window; - (nullable NSError*)writeOPMLFile:(NSURL*)url withOptions:(OpmlFileExportOptions)opt; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/Feed Import/UpdateScheduler.h b/baRSS/Feed Import/UpdateScheduler.h index 24e4ba5..58ce798 100644 --- a/baRSS/Feed Import/UpdateScheduler.h +++ b/baRSS/Feed Import/UpdateScheduler.h @@ -24,6 +24,8 @@ @class Feed; +NS_ASSUME_NONNULL_BEGIN + @interface UpdateScheduler : NSObject @property (class, readonly) NSUInteger feedsInQueue; @property (class, readonly) NSDate *dateScheduled; @@ -46,3 +48,5 @@ + (void)registerNetworkChangeNotification; + (void)unregisterNetworkChangeNotification; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/Info.plist b/baRSS/Info.plist index bae1e52..e9809b2 100644 --- a/baRSS/Info.plist +++ b/baRSS/Info.plist @@ -70,7 +70,7 @@ CFBundleVersion - 14471 + 14505 LSApplicationCategoryType public.app-category.news LSMinimumSystemVersion diff --git a/baRSS/NSCategories/NSDate+Ext.h b/baRSS/NSCategories/NSDate+Ext.h index 1d8e320..687459b 100644 --- a/baRSS/NSCategories/NSDate+Ext.h +++ b/baRSS/NSCategories/NSDate+Ext.h @@ -32,6 +32,8 @@ typedef NS_ENUM(int32_t, TimeUnitType) { TimeUnitYears = 365 * 24 * 60 * 60 }; +NS_ASSUME_NONNULL_BEGIN + @interface NSDate (Ext) + (NSString*)timeStringISO8601; + (NSString*)dayStringISO8601; @@ -57,3 +59,5 @@ typedef NS_ENUM(int32_t, TimeUnitType) { @interface NSDate (Statistics) + (NSDictionary*)refreshIntervalStatistics:(NSArray *)list; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/NSCategories/NSError+Ext.h b/baRSS/NSCategories/NSError+Ext.h index 94cd1f8..c99dde1 100644 --- a/baRSS/NSCategories/NSError+Ext.h +++ b/baRSS/NSCategories/NSError+Ext.h @@ -25,6 +25,8 @@ /// Log error message and prepend calling class and calling method. #define NSLogCaller(desc) { NSLog(@"%@:%@ %@", [self class], NSStringFromSelector(_cmd), desc); } +NS_ASSUME_NONNULL_BEGIN + @interface NSError (Ext) // Generators + (instancetype)statusCode:(NSInteger)code reason:(nullable NSString*)reason; @@ -35,3 +37,5 @@ - (BOOL)inCaseLog:(nullable const char*)title; - (BOOL)inCasePresent:(NSApplication*)app; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/NSCategories/NSString+Ext.h b/baRSS/NSCategories/NSString+Ext.h index 2fad26f..6eb66c8 100644 --- a/baRSS/NSCategories/NSString+Ext.h +++ b/baRSS/NSCategories/NSString+Ext.h @@ -22,6 +22,8 @@ @import Cocoa; +NS_ASSUME_NONNULL_BEGIN + @interface NSString (PlainHTML) + (NSString*)plainTextFromHTMLData:(NSData*)data; - (nonnull NSString*)htmlToPlainText; @@ -30,3 +32,5 @@ @interface NSString (HexColor) - (nullable NSColor*)hexColor; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/NSCategories/NSURL+Ext.h b/baRSS/NSCategories/NSURL+Ext.h index cae5845..a2b0eef 100644 --- a/baRSS/NSCategories/NSURL+Ext.h +++ b/baRSS/NSCategories/NSURL+Ext.h @@ -24,6 +24,8 @@ #define ENV_LOG_FILES 0 +NS_ASSUME_NONNULL_BEGIN + @interface NSURL (Ext) // Generators + (NSURL*)applicationSupportURL; @@ -38,3 +40,5 @@ - (void)remove; - (void)moveTo:(NSURL*)destination; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/NSCategories/NSURLRequest+Ext.h b/baRSS/NSCategories/NSURLRequest+Ext.h index 35f9bf3..1ca40a3 100644 --- a/baRSS/NSCategories/NSURLRequest+Ext.h +++ b/baRSS/NSCategories/NSURLRequest+Ext.h @@ -24,8 +24,12 @@ #define ENV_LOG_DOWNLOAD 1 +NS_ASSUME_NONNULL_BEGIN + @interface NSURLRequest (Ext) + (instancetype)withURL:(NSString*)urlStr; - (NSURLSessionDataTask*)dataTask:(nonnull void(^)(NSData * _Nullable data, NSError * _Nullable error, NSHTTPURLResponse *response))block; - (NSURLSessionDownloadTask*)downloadTask:(void(^)(NSURL * _Nullable path, NSError * _Nullable error))block; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/NSCategories/NSView+Ext.h b/baRSS/NSCategories/NSView+Ext.h index 06b9293..6a1f95b 100644 --- a/baRSS/NSCategories/NSView+Ext.h +++ b/baRSS/NSCategories/NSView+Ext.h @@ -40,6 +40,8 @@ /// Static variable to calculate origin center coordinate in its @c superview. The value of this var isn't used. static CGFloat const CENTER = -0.015625; +NS_ASSUME_NONNULL_BEGIN + /// Calculate @c origin.y going down from the top border of its @c superview static inline CGFloat YFromTop(NSView *view) { return NSHeight(view.superview.frame) - NSMinY(view.frame) - view.alignmentRectInsets.bottom; } /// @c MAX() @@ -65,7 +67,7 @@ static inline CGFloat NSMaxWidth(NSView *a, NSView *b) { return Max(NSWidth(a.fr + (NSButton*)inlineButton:(NSString*)text; + (NSPopUpButton*)popupButton:(CGFloat)w; // UI: Others -+ (NSImageView*)imageView:(NSImageName)name size:(CGFloat)size; ++ (NSImageView*)imageView:(nullable NSImageName)name size:(CGFloat)size; + (NSButton*)checkbox:(BOOL)flag; + (NSProgressIndicator*)activitySpinner; + (NSView*)radioGroup:(NSArray*)entries target:(id)target action:(nonnull SEL)action; @@ -91,7 +93,7 @@ static inline CGFloat NSMaxWidth(NSView *a, NSView *b) { return Max(NSWidth(a.fr @interface NSControl (Ext) -- (instancetype)action:(SEL)selector target:(id)target; +- (instancetype)action:(SEL)selector target:(nullable id)target; - (instancetype)large; - (instancetype)small; - (instancetype)tiny; @@ -106,3 +108,5 @@ static inline CGFloat NSMaxWidth(NSView *a, NSView *b) { return Max(NSWidth(a.fr - (instancetype)selectable; - (instancetype)multiline:(NSSize)size; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/NSCategories/NSView+Ext.m b/baRSS/NSCategories/NSView+Ext.m index 25bf344..1776d54 100644 --- a/baRSS/NSCategories/NSView+Ext.m +++ b/baRSS/NSCategories/NSView+Ext.m @@ -122,7 +122,7 @@ /// Create @c ImageView with square @c size -+ (NSImageView*)imageView:(NSImageName)name size:(CGFloat)size { ++ (NSImageView*)imageView:(nullable NSImageName)name size:(CGFloat)size { NSImageView *imgView = [[NSImageView alloc] initWithFrame: NSMakeRect(0, 0, size, size)]; if (name) imgView.image = [NSImage imageNamed:name]; return imgView; @@ -328,7 +328,7 @@ static inline void SetFrameWidth(NSView *view, CGFloat w) { @implementation NSControl (Ext) /// Set @c target and @c action simultaneously -- (instancetype)action:(SEL)selector target:(id)target { +- (instancetype)action:(SEL)selector target:(nullable id)target { self.action = selector; self.target = target; return self; diff --git a/baRSS/Preferences/Appearance Tab/SettingsAppearance.h b/baRSS/Preferences/Appearance Tab/SettingsAppearance.h index 067202a..931dd91 100644 --- a/baRSS/Preferences/Appearance Tab/SettingsAppearance.h +++ b/baRSS/Preferences/Appearance Tab/SettingsAppearance.h @@ -22,6 +22,10 @@ @import Cocoa; +NS_ASSUME_NONNULL_BEGIN + @interface SettingsAppearance : NSViewController - (void)didSelectCheckbox:(NSButton*)sender; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/Preferences/Feeds Tab/ModalFeedEdit.h b/baRSS/Preferences/Feeds Tab/ModalFeedEdit.h index 4f10a9e..677c5c5 100644 --- a/baRSS/Preferences/Feeds Tab/ModalFeedEdit.h +++ b/baRSS/Preferences/Feeds Tab/ModalFeedEdit.h @@ -24,6 +24,8 @@ #import "ModalSheet.h" @class FeedGroup, ModalSheet; +NS_ASSUME_NONNULL_BEGIN + @interface ModalEditDialog : NSViewController + (instancetype)modalWith:(FeedGroup*)group; - (ModalSheet*)getModalSheet; @@ -38,3 +40,4 @@ @interface ModalGroupEdit : ModalEditDialog @end +NS_ASSUME_NONNULL_END diff --git a/baRSS/Preferences/Feeds Tab/ModalFeedEditView.h b/baRSS/Preferences/Feeds Tab/ModalFeedEditView.h index 76bf655..2cd17fb 100644 --- a/baRSS/Preferences/Feeds Tab/ModalFeedEditView.h +++ b/baRSS/Preferences/Feeds Tab/ModalFeedEditView.h @@ -23,6 +23,8 @@ @import Cocoa; @class ModalFeedEdit; +NS_ASSUME_NONNULL_BEGIN + @interface ModalFeedEditView : NSView @property (strong) IBOutlet NSTextField *url; @property (strong) IBOutlet NSProgressIndicator *spinnerURL; @@ -43,3 +45,5 @@ - (instancetype)initWithFrame:(NSRect)frameRect NS_UNAVAILABLE; - (nullable instancetype)initWithCoder:(NSCoder *)decoder NS_UNAVAILABLE; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/Preferences/Feeds Tab/RefreshStatisticsView.h b/baRSS/Preferences/Feeds Tab/RefreshStatisticsView.h index 8594dff..2a62262 100644 --- a/baRSS/Preferences/Feeds Tab/RefreshStatisticsView.h +++ b/baRSS/Preferences/Feeds Tab/RefreshStatisticsView.h @@ -22,6 +22,8 @@ @import Cocoa; +NS_ASSUME_NONNULL_BEGIN + @protocol RefreshIntervalButtonDelegate @required /// @c sender.tag is refresh interval in seconds @@ -34,3 +36,5 @@ - (instancetype)initWithFrame:(NSRect)frameRect NS_UNAVAILABLE; - (nullable instancetype)initWithCoder:(NSCoder *)decoder NS_UNAVAILABLE; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/Preferences/Feeds Tab/SettingsFeeds+DragDrop.h b/baRSS/Preferences/Feeds Tab/SettingsFeeds+DragDrop.h index 052630f..47dfdbd 100644 --- a/baRSS/Preferences/Feeds Tab/SettingsFeeds+DragDrop.h +++ b/baRSS/Preferences/Feeds Tab/SettingsFeeds+DragDrop.h @@ -23,7 +23,11 @@ #import "SettingsFeeds.h" #import "OpmlFile.h" +NS_ASSUME_NONNULL_BEGIN + @interface SettingsFeeds (DragDrop) - (void)prepareOutlineViewForDragDrop:(NSOutlineView*)outline; - (void)importOpmlFiles:(NSArray*)files; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/Preferences/Feeds Tab/SettingsFeeds.h b/baRSS/Preferences/Feeds Tab/SettingsFeeds.h index c03094b..c117340 100644 --- a/baRSS/Preferences/Feeds Tab/SettingsFeeds.h +++ b/baRSS/Preferences/Feeds Tab/SettingsFeeds.h @@ -22,10 +22,12 @@ @import Cocoa; +NS_ASSUME_NONNULL_BEGIN + /** Manages the NSOutlineView and Feed creation and editing */ @interface SettingsFeeds : NSViewController @property (strong) NSTreeController *dataStore; -@property (strong) NSArray *currentlyDraggedNodes; +@property (strong, nullable) NSArray *currentlyDraggedNodes; - (void)editSelectedItem; - (void)doubleClickOutlineView:(NSOutlineView*)sender; @@ -40,3 +42,5 @@ - (BOOL)endCoreDataChangeUndoEmpty:(BOOL)undoEmpty forceUndo:(BOOL)force; - (void)restoreOrderingAndIndexPathStr:(NSArray*)parentsList; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/Preferences/Feeds Tab/SettingsFeedsView.h b/baRSS/Preferences/Feeds Tab/SettingsFeedsView.h index 734ffc8..3bf3e29 100644 --- a/baRSS/Preferences/Feeds Tab/SettingsFeedsView.h +++ b/baRSS/Preferences/Feeds Tab/SettingsFeedsView.h @@ -23,6 +23,8 @@ @import Cocoa; @class SettingsFeeds; +NS_ASSUME_NONNULL_BEGIN + @interface SettingsFeedsView : NSView @property (strong) IBOutlet NSOutlineView *outline; @property (strong) IBOutlet NSTextField *status; @@ -45,3 +47,5 @@ extern NSUserInterfaceItemIdentifier const CustomCellRefresh; @interface SeparatorColumnCell : NSTableCellView extern NSUserInterfaceItemIdentifier const CustomCellSeparator; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/Preferences/General Tab/SettingsGeneral.h b/baRSS/Preferences/General Tab/SettingsGeneral.h index b17f7db..1ec4835 100644 --- a/baRSS/Preferences/General Tab/SettingsGeneral.h +++ b/baRSS/Preferences/General Tab/SettingsGeneral.h @@ -22,7 +22,11 @@ @import Cocoa; +NS_ASSUME_NONNULL_BEGIN + @interface SettingsGeneral : NSViewController - (void)changeHttpApplication:(NSPopUpButton *)sender; - (void)clickHowToDefaults:(NSButton *)sender; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/Preferences/General Tab/SettingsGeneralView.h b/baRSS/Preferences/General Tab/SettingsGeneralView.h index c2da80e..b2fa8e5 100644 --- a/baRSS/Preferences/General Tab/SettingsGeneralView.h +++ b/baRSS/Preferences/General Tab/SettingsGeneralView.h @@ -23,6 +23,8 @@ @import Cocoa; @class SettingsGeneral; +NS_ASSUME_NONNULL_BEGIN + @interface SettingsGeneralView : NSView @property (strong) IBOutlet NSPopUpButton* popupHttpApplication; @property (strong) IBOutlet NSTextField *defaultReader; @@ -32,3 +34,4 @@ - (nullable instancetype)initWithCoder:(NSCoder *)decoder NS_UNAVAILABLE; @end +NS_ASSUME_NONNULL_END diff --git a/baRSS/Preferences/ModalSheet.h b/baRSS/Preferences/ModalSheet.h index c56abba..db87f84 100644 --- a/baRSS/Preferences/ModalSheet.h +++ b/baRSS/Preferences/ModalSheet.h @@ -22,6 +22,8 @@ @import Cocoa; +NS_ASSUME_NONNULL_BEGIN + @interface ModalSheet : NSPanel @property (readonly) BOOL didTapCancel; @@ -31,3 +33,5 @@ - (void)setDoneEnabled:(BOOL)accept; - (void)extendContentViewBy:(CGFloat)dy; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/Preferences/Preferences.h b/baRSS/Preferences/Preferences.h index 2fc34e2..00d63d3 100644 --- a/baRSS/Preferences/Preferences.h +++ b/baRSS/Preferences/Preferences.h @@ -23,7 +23,11 @@ @import Cocoa; @class SettingsFeeds; +NS_ASSUME_NONNULL_BEGIN + @interface Preferences : NSWindow + (instancetype)window; - (__kindof NSViewController*)selectTab:(NSUInteger)index; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/Status Bar Menu/BarMenu.h b/baRSS/Status Bar Menu/BarMenu.h index 459ab44..2b95661 100644 --- a/baRSS/Status Bar Menu/BarMenu.h +++ b/baRSS/Status Bar Menu/BarMenu.h @@ -23,7 +23,11 @@ @import Cocoa; @class BarStatusItem; +NS_ASSUME_NONNULL_BEGIN + @interface BarMenu : NSObject - (instancetype)init NS_UNAVAILABLE; - (instancetype)initWithStatusItem:(BarStatusItem*)statusItem NS_DESIGNATED_INITIALIZER; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/Status Bar Menu/BarStatusItem.h b/baRSS/Status Bar Menu/BarStatusItem.h index 8234619..6fc2ce9 100644 --- a/baRSS/Status Bar Menu/BarStatusItem.h +++ b/baRSS/Status Bar Menu/BarStatusItem.h @@ -22,6 +22,8 @@ @import Cocoa; +NS_ASSUME_NONNULL_BEGIN + @interface BarStatusItem : NSObject @property (weak, readonly) NSMenu *mainMenu; @@ -32,3 +34,4 @@ - (void)showWelcomeMessage; @end +NS_ASSUME_NONNULL_END diff --git a/baRSS/Status Bar Menu/MapUnreadTotal.h b/baRSS/Status Bar Menu/MapUnreadTotal.h index 30b10a0..ba6e764 100644 --- a/baRSS/Status Bar Menu/MapUnreadTotal.h +++ b/baRSS/Status Bar Menu/MapUnreadTotal.h @@ -22,6 +22,8 @@ @import Cocoa; +NS_ASSUME_NONNULL_BEGIN + @interface UnreadTotal : NSObject @property (nonatomic, assign) NSUInteger unread; @property (nonatomic, assign) NSUInteger total; @@ -39,3 +41,5 @@ - (UnreadTotal*)objectForKeyedSubscript:(NSString*)key; - (void)setObject:(UnreadTotal*)obj forKeyedSubscript:(NSString*)key; @end + +NS_ASSUME_NONNULL_END diff --git a/baRSS/Status Bar Menu/NSMenu+Ext.h b/baRSS/Status Bar Menu/NSMenu+Ext.h index 7c929fc..ba68769 100644 --- a/baRSS/Status Bar Menu/NSMenu+Ext.h +++ b/baRSS/Status Bar Menu/NSMenu+Ext.h @@ -23,6 +23,8 @@ @import Cocoa; @class FeedGroup; +NS_ASSUME_NONNULL_BEGIN + @interface NSMenu (Ext) @property (nonnull, copy, readonly) NSString *titleIndexPath; @property (nullable, readonly) NSMenuItem* parentItem; @@ -42,3 +44,5 @@ - (instancetype)alternateWithTitle:(NSString*)title; - (void)setTitleCount:(NSUInteger)count; @end + +NS_ASSUME_NONNULL_END