Use Q_UNUSED

This commit is contained in:
Jonas Kvinge
2020-08-01 03:23:50 +02:00
parent 0735483321
commit f55a80b15a
3 changed files with 14 additions and 4 deletions

View File

@@ -117,6 +117,9 @@ QDebug operator<<(QDebug dbg, NSObject* object) {
- (BOOL) applicationShouldHandleReopen: (NSApplication*)app hasVisibleWindows:(BOOL)flag { - (BOOL) applicationShouldHandleReopen: (NSApplication*)app hasVisibleWindows:(BOOL)flag {
Q_UNUSED(app);
Q_UNUSED(flag);
if (application_handler_) { if (application_handler_) {
application_handler_->Activate(); application_handler_->Activate();
} }
@@ -129,6 +132,7 @@ QDebug operator<<(QDebug dbg, NSObject* object) {
} }
- (NSMenu*)applicationDockMenu:(NSApplication*)sender { - (NSMenu*)applicationDockMenu:(NSApplication*)sender {
Q_UNUSED(sender);
return dock_menu_; return dock_menu_;
} }
@@ -141,11 +145,13 @@ QDebug operator<<(QDebug dbg, NSObject* object) {
} }
- (void)applicationDidFinishLaunching:(NSNotification*)aNotification { - (void)applicationDidFinishLaunching:(NSNotification*)aNotification {
Q_UNUSED(aNotification);
} }
- (BOOL)application:(NSApplication*)app openFile:(NSString*)filename { - (BOOL)application:(NSApplication*)app openFile:(NSString*)filename {
Q_UNUSED(app);
qLog(Debug) << "Wants to open:" << [filename UTF8String]; qLog(Debug) << "Wants to open:" << [filename UTF8String];
if (application_handler_->LoadUrl(QString::fromUtf8([filename UTF8String]))) { if (application_handler_->LoadUrl(QString::fromUtf8([filename UTF8String]))) {
@@ -166,10 +172,13 @@ QDebug operator<<(QDebug dbg, NSObject* object) {
} }
- (NSApplicationTerminateReply) applicationShouldTerminate:(NSApplication*) sender { - (NSApplicationTerminateReply) applicationShouldTerminate:(NSApplication*) sender {
Q_UNUSED(sender);
return NSTerminateNow; return NSTerminateNow;
} }
- (BOOL) userNotificationCenter: (id)center shouldPresentNotification: (id)notification { - (BOOL) userNotificationCenter: (id)center shouldPresentNotification: (id)notification {
Q_UNUSED(center);
Q_UNUSED(notification);
// Always show notifications, even if Strawberry is in the foreground. // Always show notifications, even if Strawberry is in the foreground.
return YES; return YES;
} }

View File

@@ -52,6 +52,7 @@
} }
- (BOOL) validateMenuItem: (NSMenuItem*)menuItem { - (BOOL) validateMenuItem: (NSMenuItem*)menuItem {
Q_UNUSED(menuItem);
// This is called when the menu is shown. // This is called when the menu is shown.
return action_->isEnabled(); return action_->isEnabled();
} }

View File

@@ -96,9 +96,9 @@ public:
pimpl->returnPressed(); pimpl->returnPressed();
} }
-(BOOL)control: (NSControl *)control textView: -(BOOL)control: (NSControl*)control textView: (NSTextView*)textView doCommandBySelector: (SEL)commandSelector {
(NSTextView *)textView doCommandBySelector: Q_UNUSED(control);
(SEL)commandSelector { Q_UNUSED(textView);
Q_ASSERT(pimpl); Q_ASSERT(pimpl);
if (!pimpl) return NO; if (!pimpl) return NO;
if (commandSelector == @selector(moveDown:)) { if (commandSelector == @selector(moveDown:)) {