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;
|
||||
|
||||
QCocoaAutoReleasePool pool;
|
||||
NSInputManager *currentIManager = [NSInputManager currentInputManager];
|
||||
if (currentIManager) {
|
||||
[currentIManager markedTextAbandoned:view];
|
||||
if (NSTextInputContext *ctxt = [NSTextInputContext currentInputContext]) {
|
||||
[ctxt discardMarkedText];
|
||||
[view unmarkText];
|
||||
}
|
||||
}
|
||||
|
@ -804,10 +804,7 @@ QT_WARNING_POP
|
||||
}
|
||||
|
||||
if ([self hasMarkedText]) {
|
||||
NSInputManager* inputManager = [NSInputManager currentInputManager];
|
||||
if ([inputManager wantsToHandleMouseEvents]) {
|
||||
[inputManager handleMouseEvent:theEvent];
|
||||
}
|
||||
[[NSTextInputContext currentInputContext] handleEvent:theEvent];
|
||||
} else {
|
||||
if ([QNSView convertKeyModifiers:[theEvent modifierFlags]] & Qt::MetaModifier) {
|
||||
m_buttons |= Qt::RightButton;
|
||||
|
Loading…
Reference in New Issue
Block a user