From 0ed65a651307007fc0e61ad69b33783ba9c3a736 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Tue, 14 Oct 2014 16:26:17 +0200 Subject: iOS: ignore sender of actions for edit menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The reason is that the sender is sometimes 'NULL', so we cannot rely on it. But the current test with our prefix should suffice. Change-Id: Ie58bf062cbade08feda622bda753d63e1d811a8d Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/ios/qiosmenu.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms/ios') diff --git a/src/plugins/platforms/ios/qiosmenu.mm b/src/plugins/platforms/ios/qiosmenu.mm index c247c16514..005b06547e 100644 --- a/src/plugins/platforms/ios/qiosmenu.mm +++ b/src/plugins/platforms/ios/qiosmenu.mm @@ -88,8 +88,9 @@ static NSString *const kSelectorPrefix = @"_qtMenuItem_"; - (id)targetForAction:(SEL)action withSender:(id)sender { + Q_UNUSED(sender); BOOL containsPrefix = ([NSStringFromSelector(action) rangeOfString:kSelectorPrefix].location != NSNotFound); - return (containsPrefix && [sender isKindOfClass:[UIMenuController class]]) ? self : 0; + return containsPrefix ? self : 0; } - (NSMethodSignature *)methodSignatureForSelector:(SEL)selector -- cgit v1.2.3