summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>2014-10-14 14:04:59 +0200
committerRichard Moe Gustavsen <richard.gustavsen@digia.com>2014-10-19 00:55:49 +0200
commitfc567acefb9eddb4d52d7cbe6510364fa865f330 (patch)
tree241f5dd2e04d0beca687a68431d4464168f71997 /src/plugins/platforms/ios
parent1cfd45782638b8266d46af289de5abdd0371fc27 (diff)
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>
Diffstat (limited to 'src/plugins/platforms/ios')
-rw-r--r--src/plugins/platforms/ios/quiview.mm11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/plugins/platforms/ios/quiview.mm b/src/plugins/platforms/ios/quiview.mm
index 200b07b5fc..81f82ba97d 100644
--- a/src/plugins/platforms/ios/quiview.mm
+++ b/src/plugins/platforms/ios/quiview.mm
@@ -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