Skip to content

Commit

Permalink
Remove QS_DEPRECATED* macros
Browse files Browse the repository at this point in the history
These macros prevent the project from compiling if swift is added to a
framework target (such as QSCore).
  • Loading branch information
n8henrie committed Mar 31, 2024
1 parent 864e2a3 commit 56e15c1
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Quicksilver/Code-QuickStepCore/QSCatalogEntry.m
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ - (NSMutableDictionary *)sourceSettings {


// Backward-compatibility
- (BOOL)deletable QS_DEPRECATED { return self.canBeDeleted; }
- (BOOL)deletable __attribute__((deprecated)) { return self.canBeDeleted; }

@end

Expand Down
2 changes: 1 addition & 1 deletion Quicksilver/Code-QuickStepCore/QSCatalogEntry_Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@
@end

@interface QSCatalogEntry (OldStyleSourceSupport)
- (id)objectForKey:(NSString *)key QS_DEPRECATED_MSG("Sources now get QSCatalogEntry objects. Please use those");
- (id)objectForKey:(NSString *)key __attribute__((deprecated("Sources now get QSCatalogEntry objects. Please use those")));
@end
4 changes: 2 additions & 2 deletions Quicksilver/Code-QuickStepCore/QSLibrarian.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ extern QSLibrarian *QSLib; // Shared Instance
- (void)startThreadedAndForcedScan;
- (IBAction)forceScanCatalog:(id)sender;
- (IBAction)scanCatalog:(id)sender;
- (void)scanCatalogWithDelay:(id)sender QS_DEPRECATED;
- (void)scanCatalogWithDelay:(id)sender __attribute__((deprecated));
- (BOOL)itemIsOmitted:(QSBasicObject *)item;
- (void)setItem:(QSBasicObject *)item isOmitted:(BOOL)omit;
#ifdef DEBUG
- (CGFloat) estimatedTimeForSearchInSet:(id)set;
- (NSMutableArray *)scoreTest:(id)sender;
#endif
- (NSMutableArray *)scoredArrayForString:(NSString *)string;
- (NSMutableArray *)scoredArrayForString:(NSString *)string inNamedSet:(NSString *)setName QS_DEPRECATED;
- (NSMutableArray *)scoredArrayForString:(NSString *)string inNamedSet:(NSString *)setName __attribute__((deprecated));
- (NSMutableArray *)scoredArrayForString:(NSString *)searchString inSet:(id)set;
- (NSMutableArray *)scoredArrayForString:(NSString *)searchString inSet:(NSArray *)set mnemonicsOnly:(BOOL)mnemonicsOnly;
- (NSMutableArray *)shelfNamed:(NSString *)shelfName;
Expand Down
4 changes: 2 additions & 2 deletions Quicksilver/Code-QuickStepCore/QSObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ typedef struct _QSObjectFlags {
+ (void)interfaceChanged;

+ (id)objectWithName:(NSString *)aName;
+ (id)objectWithIdentifier:(NSString *)anIdentifier QS_DEPRECATED;
+ (id)objectWithIdentifier:(NSString *)anIdentifier __attribute__((deprecated));
+ (id)makeObjectWithIdentifier:(NSString *)anIdentifier;
+ (id)objectByMergingObjects:(NSArray *)objects;
+ (id)objectByMergingObjects:(NSArray *)objects withObject:(QSObject *)object;
Expand Down Expand Up @@ -120,7 +120,7 @@ typedef struct _QSObjectFlags {
- (BOOL)unloadIcon;
- (NSImage *)icon;
- (void)setIcon:(NSImage *)newIcon;
- (void)updateIcon:(NSImage *)newIcon QS_DEPRECATED_MSG("Use -setIcon:");
- (void)updateIcon:(NSImage *)newIcon __attribute__((deprecated("Use -setIcon:")));
@end

@interface QSObject (Hierarchy)
Expand Down
2 changes: 1 addition & 1 deletion Quicksilver/Code-QuickStepCore/QSObjectHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

- (NSAppleEventDescriptor *)AEDescriptorForObject:(QSObject *)object;

- (QSObject *)initFileObject:(QSObject *)object ofType:(NSString *)type QS_DEPRECATED NS_RETURNS_NOT_RETAINED;
- (QSObject *)initFileObject:(QSObject *)object ofType:(NSString *)type __attribute__((deprecated)) NS_RETURNS_NOT_RETAINED;
@end


2 changes: 1 addition & 1 deletion Quicksilver/Code-QuickStepCore/QSObjectRanker.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ extern NSString *QSRankingIncludeOmitted; // BOOL. Specifies whether the ranke
- (NSString*)matchedStringForAbbreviation:(NSString*)anAbbreviation hitmask:(NSIndexSet **)hitmask inContext:(NSString *)context;

@optional
- (QSRankedObject *)rankedObject:(QSBasicObject *)object forAbbreviation:(NSString*)anAbbreviation inContext:(NSString *)context withMnemonics:(NSArray *)mnemonics mnemonicsOnly:(BOOL)mnemonicsOnly QS_DEPRECATED;
- (QSRankedObject *)rankedObject:(QSBasicObject *)object forAbbreviation:(NSString*)anAbbreviation inContext:(NSString *)context withMnemonics:(NSArray *)mnemonics mnemonicsOnly:(BOOL)mnemonicsOnly __attribute__((deprecated));
@end


Expand Down
6 changes: 3 additions & 3 deletions Quicksilver/Code-QuickStepCore/QSObjectSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
/* The following is deprecated because it duplicates -selection.
* But it can't be removed because dyld will notice and plugins will fail to load
*/
NSMutableDictionary *currentEntry QS_DEPRECATED;
NSMutableDictionary *currentEntry __attribute__((deprecated));
}

- (void)invalidateSelf;
Expand All @@ -102,7 +102,7 @@
// Please use -selectedEntry instead of those
// The rational being that between -currentEntry, -selection and direct Ivar
// everything can go wrong.
@property (retain) NSMutableDictionary *currentEntry QS_DEPRECATED;
@property (retain) QSCatalogEntry *selection QS_DEPRECATED;
@property (retain) NSMutableDictionary *currentEntry __attribute__((deprecated));
@property (retain) QSCatalogEntry *selection __attribute__((deprecated));

@end
4 changes: 2 additions & 2 deletions Quicksilver/Code-QuickStepCore/QSProcessMonitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
- (NSArray *)backgroundProcesses; /* QSObjects */

/* Deprecated, equivalent to the above without KVO */
- (NSArray *)getAllProcesses QS_DEPRECATED_MSG("Use -allProcesses");
- (NSArray *)getVisibleProcesses QS_DEPRECATED_MSG("Use -visibleProcesses");
- (NSArray *)getAllProcesses __attribute__((deprecated("Use -allProcesses")));
- (NSArray *)getVisibleProcesses __attribute__((deprecated("Use -visibleProcesses")));

- (QSObject *)imbuedFileProcessForDict:(NSDictionary *)dict;
- (BOOL)handleProcessEvent:(NSEvent *)theEvent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ NSComparisonResult prefixCompare(NSString *aString, NSString *bString);

@interface NSString (Replacement)
- (NSArray *)lines;
- (NSString *)stringByReplacing:(NSString *)search with:(NSString *)replacement QS_DEPRECATED;
- (NSString *)stringByReplacing:(NSString *)search with:(NSString *)replacement __attribute__((deprecated));

@end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
- (void)reopenApplication:(NSDictionary *)theApp;
- (void)quitApplication:(NSDictionary *)theApp;
- (void)quitOtherApplications:(NSArray *)theApps;
- (NSDictionary *)dictForApplicationIdentifier:(NSString *)ident QS_DEPRECATED;
- (NSDictionary *)dictForApplicationIdentifier:(NSString *)ident __attribute__((deprecated));
- (NSString *)commentForFile:(NSString *)path;
- (BOOL)setComment:(NSString*)comment forFile:(NSString *)path;
- (BOOL)openFileInBackground:(NSString *)fullPath;
Expand Down
4 changes: 2 additions & 2 deletions Quicksilver/Code-QuickStepFoundation/QSGCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ inline void QSGCDDelayed(NSTimeInterval delay, void (^block)(void))

// Remove those when the plugins are call-free
// Don't forget to remove definitions in .m file
void runOnMainQueueSync(void (^block)(void)) QS_DEPRECATED_MSG("Use QSGCDMainSync");
void runOnQueueSync(dispatch_queue_t queue, void (^block)(void)) QS_DEPRECATED_MSG("Use QSGCDQueueSync");
void runOnMainQueueSync(void (^block)(void)) __attribute__((deprecated("Use QSGCDMainSync")));
void runOnQueueSync(dispatch_queue_t queue, void (^block)(void)) __attribute__((deprecated("Use QSGCDQueueSync")));

#endif // __QSGCD__
4 changes: 2 additions & 2 deletions Quicksilver/Code-QuickStepFoundation/QSMacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ Code; \
_Pragma("clang diagnostic pop") \
} while (0)

#define QS_DEPRECATED __attribute__((deprecated))
#define QS_DEPRECATED_MSG(s) __attribute__((deprecated(s)))
//#define QS_DEPRECATED __attribute__((deprecated))
//#define QS_DEPRECATED_MSG(s) __attribute__((deprecated(s)))

6 changes: 3 additions & 3 deletions Quicksilver/Code-QuickStepInterface/QSDockingWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@
@result YES if window is hidden into the screen edge, otherwise NO
*/
- (BOOL)isDocked;
- (BOOL)canFade QS_DEPRECATED_MSG("Use -isDockedInstead");
- (BOOL)canFade __attribute__((deprecated("Use -isDockedInstead")));

- (NSString *)autosaveName QS_DEPRECATED_MSG("Use -NSWindow frameAutosaveName or -NSWindowController windowFrameAutosaveName");
- (void)setAutosaveName:(NSString *)newAutosaveName QS_DEPRECATED_MSG("Use -NSWindow frameAutosaveName or -NSWindowController windowFrameAutosaveName");;
- (NSString *)autosaveName __attribute__((deprecated("Use -NSWindow frameAutosaveName or -NSWindowController windowFrameAutosaveName")));
- (void)setAutosaveName:(NSString *)newAutosaveName __attribute__((deprecated("Use -NSWindow frameAutosaveName or -NSWindowController windowFrameAutosaveName")));;
- (void)resignKeyWindowNow;
- (IBAction)orderFrontHidden:(id)sender;
- (void)saveFrame;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
BOOL expanded;
}
- (void)firstResponderChanged:(NSResponder *)aResponder;
- (void)resetAdjustTimer QS_DEPRECATED_MSG("Use -adjustWindow:");
- (void)resetAdjustTimer __attribute__((deprecated("Use -adjustWindow:")));
- (void)expandWindow:(id)sender;
- (void)contractWindow:(id)sender;

Expand Down
8 changes: 4 additions & 4 deletions Quicksilver/Code-QuickStepInterface/QSTableView.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
- (BOOL)tableView:(QSTableView *)aTableView shouldDrawRow:(NSInteger)rowIndex inClipRect:(NSRect)clipRect;
- (BOOL)tableView:(QSTableView *)aTableView rowIsSeparator:(NSInteger)rowIndex;
- (NSMenu *)tableView:(QSTableView*)tableView menuForTableColumn:(NSTableColumn *)column row:(NSInteger)row;
- (void)tableView:(QSTableView *)tv dropEndedWithOperation:(NSDragOperation)operation QS_DEPRECATED_MSG("It has neved been called on the delegate");
- (void)tableView:(QSTableView *)tv dropEndedWithOperation:(NSDragOperation)operation __attribute__((deprecated("It has neved been called on the delegate")));
- (void)drawSeparatorForRow:(NSInteger)rowIndex clipRect:(NSRect)clipRect;
@end

@protocol QSTableViewDataSource <NSTableViewDataSource>

@optional
- (void)tableView:(QSTableView *)aTableView dropEndedWithOperation:(NSDragOperation)operation QS_DEPRECATED_MSG("Use -tableView:draggingSession:... and friends");
- (void)tableView:(QSTableView *)aTableView dropEndedWithOperation:(NSDragOperation)operation __attribute__((deprecated("Use -tableView:draggingSession:... and friends")));
@end

@interface QSTableView : NSTableView {
Expand All @@ -30,8 +30,8 @@

- (NSColor *)highlightColor;
- (void)setHighlightColor:(NSColor *)aHighlightColor;
- (id)draggingDelegate QS_DEPRECATED_MSG("Use -tableView:draggingSession:... and friends");
- (void)setDraggingDelegate:(id)aDraggingDelegate QS_DEPRECATED_MSG("Use -tableView:draggingSession:... and friends");;
- (id)draggingDelegate __attribute__((deprecated("Use -tableView:draggingSession:... and friends")));
- (void)setDraggingDelegate:(id)aDraggingDelegate __attribute__((deprecated("Use -tableView:draggingSession:... and friends")));;
- (void)setOpaque:(BOOL)flag;
- (id <QSTableViewDelegate>)delegate;
- (id <QSTableViewDataSource>)dataSource;
Expand Down

0 comments on commit 56e15c1

Please sign in to comment.