iOS: ensure edit menu works on iOS6

Method "- (id)targetForAction:(SEL)action withSender:(id)sender" is
only available from iOS7. So change implementation to use
whats available on iOS 6.

Change-Id: I4e21495073364e83ef396dfab47a7ea2a23bbead
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
bb10
Richard Moe Gustavsen 2014-10-14 14:04:59 +02:00
parent 1cfd457826
commit fc567acefb
1 changed files with 8 additions and 3 deletions

View File

@ -340,11 +340,16 @@
QWindowSystemInterface::flushWindowSystemEvents();
}
- (id)targetForAction:(SEL)action withSender:(id)sender
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender
{
// Check first if QIOSMenu should handle the action before continuing up the responder chain
id target = [QIOSMenu::menuActionTarget() targetForAction:action withSender:sender];
return target ? target : [super targetForAction:action withSender:sender];
return [QIOSMenu::menuActionTarget() targetForAction:action withSender:sender] != 0;
}
- (id)forwardingTargetForSelector:(SEL)selector
{
Q_UNUSED(selector)
return QIOSMenu::menuActionTarget();
}
@end