iOS: ignore sender of actions for edit menu

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ø <tor.arne.vestbo@digia.com>
This commit is contained in:
Richard Moe Gustavsen 2014-10-14 16:26:17 +02:00
parent 3797ee7747
commit 0ed65a6513

View File

@ -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