summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2015-07-17 15:06:22 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-07-17 16:35:42 +0200
commitb2603b76655ac819e43c063bb6f16bc95f358083 (patch)
tree0fbe2c367ebfffdb70e9e3f21a7cf408bafd9626 /src/plugins/platforms/cocoa
parent99b94aadf875c822afb6c2580e43355ac392ac92 (diff)
parent756266d01560157b7274e466b9ffc1b0e2ef9a1f (diff)
Merge remote-tracking branch 'origin/5.5' into HEAD
Conflicts: src/plugins/platforms/windows/qwindowsopengltester.cpp Change-Id: Ia7abeba9395ccf84e2fa81b91a5725a86dedb9fe
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r--src/plugins/platforms/cocoa/qcocoaapplication.mm20
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm2
2 files changed, 11 insertions, 11 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaapplication.mm b/src/plugins/platforms/cocoa/qcocoaapplication.mm
index 227ab05c25..d9919f1120 100644
--- a/src/plugins/platforms/cocoa/qcocoaapplication.mm
+++ b/src/plugins/platforms/cocoa/qcocoaapplication.mm
@@ -79,12 +79,12 @@ QT_USE_NAMESPACE
- (void)QT_MANGLE_NAMESPACE(qt_setDockMenu):(NSMenu *)newMenu
{
- [[QCocoaApplicationDelegate sharedDelegate] setDockMenu:newMenu];
+ [[QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) sharedDelegate] setDockMenu:newMenu];
}
- (QT_MANGLE_NAMESPACE(QCocoaMenuLoader) *)QT_MANGLE_NAMESPACE(qt_qcocoamenuLoader)
{
- return [[QCocoaApplicationDelegate sharedDelegate] menuLoader];
+ return [[QT_MANGLE_NAMESPACE(QCocoaApplicationDelegate) sharedDelegate] menuLoader];
}
- (int)QT_MANGLE_NAMESPACE(qt_validModesForFontPanel):(NSFontPanel *)fontPanel
@@ -147,9 +147,9 @@ static const QByteArray q_macLocalEventType = QByteArrayLiteral("mac_generic_NSE
@end
-@implementation QNSApplication
+@implementation QT_MANGLE_NAMESPACE(QNSApplication)
-- (void)qt_sendEvent_original:(NSEvent *)event
+- (void)QT_MANGLE_NAMESPACE(qt_sendEvent_original):(NSEvent *)event
{
Q_UNUSED(event);
// This method will only be used as a signature
@@ -157,14 +157,14 @@ static const QByteArray q_macLocalEventType = QByteArrayLiteral("mac_generic_NSE
// containing the original [NSApplication sendEvent:] implementation
}
-- (void)qt_sendEvent_replacement:(NSEvent *)event
+- (void)QT_MANGLE_NAMESPACE(qt_sendEvent_replacement):(NSEvent *)event
{
// This method (or its implementation to be precise) will
// be called instead of sendEvent if redirection occurs.
// 'self' will then be an instance of NSApplication
// (and not QNSApplication)
if (![NSApp QT_MANGLE_NAMESPACE(qt_filterEvent):event])
- [self qt_sendEvent_original:event];
+ [self QT_MANGLE_NAMESPACE(qt_sendEvent_original):event];
}
- (void)sendEvent:(NSEvent *)event
@@ -187,7 +187,7 @@ void qt_redirectNSApplicationSendEvent()
// can be unloaded.
return;
- if ([NSApp isMemberOfClass:[QNSApplication class]]) {
+ if ([NSApp isMemberOfClass:[QT_MANGLE_NAMESPACE(QNSApplication) class]]) {
// No need to change implementation since Qt
// already controls a subclass of NSApplication
return;
@@ -200,9 +200,9 @@ void qt_redirectNSApplicationSendEvent()
qt_cocoa_change_implementation(
[NSApplication class],
@selector(sendEvent:),
- [QNSApplication class],
- @selector(qt_sendEvent_replacement:),
- @selector(qt_sendEvent_original:));
+ [QT_MANGLE_NAMESPACE(QNSApplication) class],
+ @selector(QT_MANGLE_NAMESPACE(qt_sendEvent_replacement):),
+ @selector(QT_MANGLE_NAMESPACE(qt_sendEvent_original):));
}
void qt_resetNSApplicationSendEvent()
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index 3caed80e38..4309702fd5 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -1436,7 +1436,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
if (eventType == QEvent::KeyPress) {
if (m_composingText.isEmpty())
- m_sendKeyEvent = !QWindowSystemInterface::tryHandleShortcutEvent(focusWindow, timestamp, keyCode, modifiers, text);
+ m_sendKeyEvent = !QWindowSystemInterface::tryHandleShortcutEvent(focusWindow, timestamp, keyCode, modifiers, text, [nsevent isARepeat], 1);
QObject *fo = QGuiApplication::focusObject();
if (m_sendKeyEvent && fo) {