Cocoa: stop using the deprecated NSInputManager.
Replaced by NSTextInputContext. Change-Id: I694b28b766f8bf1d37e0ee87ff503e33d205f8ab Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
This commit is contained in:
parent
5350ee7ad5
commit
1fe2349762
@ -99,9 +99,8 @@ void QCocoaInputContext::reset()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
QCocoaAutoReleasePool pool;
|
QCocoaAutoReleasePool pool;
|
||||||
NSInputManager *currentIManager = [NSInputManager currentInputManager];
|
if (NSTextInputContext *ctxt = [NSTextInputContext currentInputContext]) {
|
||||||
if (currentIManager) {
|
[ctxt discardMarkedText];
|
||||||
[currentIManager markedTextAbandoned:view];
|
|
||||||
[view unmarkText];
|
[view unmarkText];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -804,10 +804,7 @@ QT_WARNING_POP
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ([self hasMarkedText]) {
|
if ([self hasMarkedText]) {
|
||||||
NSInputManager* inputManager = [NSInputManager currentInputManager];
|
[[NSTextInputContext currentInputContext] handleEvent:theEvent];
|
||||||
if ([inputManager wantsToHandleMouseEvents]) {
|
|
||||||
[inputManager handleMouseEvent:theEvent];
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if ([QNSView convertKeyModifiers:[theEvent modifierFlags]] & Qt::MetaModifier) {
|
if ([QNSView convertKeyModifiers:[theEvent modifierFlags]] & Qt::MetaModifier) {
|
||||||
m_buttons |= Qt::RightButton;
|
m_buttons |= Qt::RightButton;
|
||||||
|
Loading…
Reference in New Issue
Block a user