From f55a80b15a388a0fa983ff19f8b78279b1c21acd Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sat, 1 Aug 2020 03:23:50 +0200 Subject: [PATCH] Use Q_UNUSED --- src/core/mac_startup.mm | 11 ++++++++++- src/core/macsystemtrayicon.mm | 1 + src/widgets/qsearchfield_mac.mm | 6 +++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/core/mac_startup.mm b/src/core/mac_startup.mm index 4096fe46f..bff804432 100644 --- a/src/core/mac_startup.mm +++ b/src/core/mac_startup.mm @@ -117,6 +117,9 @@ QDebug operator<<(QDebug dbg, NSObject* object) { - (BOOL) applicationShouldHandleReopen: (NSApplication*)app hasVisibleWindows:(BOOL)flag { + Q_UNUSED(app); + Q_UNUSED(flag); + if (application_handler_) { application_handler_->Activate(); } @@ -129,6 +132,7 @@ QDebug operator<<(QDebug dbg, NSObject* object) { } - (NSMenu*)applicationDockMenu:(NSApplication*)sender { + Q_UNUSED(sender); return dock_menu_; } @@ -141,11 +145,13 @@ QDebug operator<<(QDebug dbg, NSObject* object) { } - (void)applicationDidFinishLaunching:(NSNotification*)aNotification { - + Q_UNUSED(aNotification); } - (BOOL)application:(NSApplication*)app openFile:(NSString*)filename { + Q_UNUSED(app); + qLog(Debug) << "Wants to open:" << [filename UTF8String]; if (application_handler_->LoadUrl(QString::fromUtf8([filename UTF8String]))) { @@ -166,10 +172,13 @@ QDebug operator<<(QDebug dbg, NSObject* object) { } - (NSApplicationTerminateReply) applicationShouldTerminate:(NSApplication*) sender { + Q_UNUSED(sender); return NSTerminateNow; } - (BOOL) userNotificationCenter: (id)center shouldPresentNotification: (id)notification { + Q_UNUSED(center); + Q_UNUSED(notification); // Always show notifications, even if Strawberry is in the foreground. return YES; } diff --git a/src/core/macsystemtrayicon.mm b/src/core/macsystemtrayicon.mm index e99b2340f..62c3098c6 100644 --- a/src/core/macsystemtrayicon.mm +++ b/src/core/macsystemtrayicon.mm @@ -52,6 +52,7 @@ } - (BOOL) validateMenuItem: (NSMenuItem*)menuItem { + Q_UNUSED(menuItem); // This is called when the menu is shown. return action_->isEnabled(); } diff --git a/src/widgets/qsearchfield_mac.mm b/src/widgets/qsearchfield_mac.mm index b6a790737..822d1448d 100644 --- a/src/widgets/qsearchfield_mac.mm +++ b/src/widgets/qsearchfield_mac.mm @@ -96,9 +96,9 @@ public: pimpl->returnPressed(); } --(BOOL)control: (NSControl *)control textView: -(NSTextView *)textView doCommandBySelector: -(SEL)commandSelector { +-(BOOL)control: (NSControl*)control textView: (NSTextView*)textView doCommandBySelector: (SEL)commandSelector { + Q_UNUSED(control); + Q_UNUSED(textView); Q_ASSERT(pimpl); if (!pimpl) return NO; if (commandSelector == @selector(moveDown:)) {