macOS: Group stray input context function with other input context functions

Change-Id: I9be3c170c20aca8a7d3c8bb81b7b019cd555b3f1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
bb10
Tor Arne Vestbø 2018-03-15 16:52:53 +01:00
parent be015ef27d
commit 83a1203c3b
2 changed files with 10 additions and 10 deletions

View File

@ -62,7 +62,6 @@ Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QNSViewMouseMoveHelper));
- (void)setQCocoaGLContext:(QCocoaGLContext *)context;
#endif
- (void)drawRect:(NSRect)dirtyRect;
- (void)textInputContextKeyboardSelectionDidChangeNotification : (NSNotification *) textInputContextKeyboardSelectionDidChangeNotification;
- (void)viewDidHide;
- (void)removeFromSuperview;
- (void)cancelComposingText;

View File

@ -124,6 +124,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
// Private interface
@interface QT_MANGLE_NAMESPACE(QNSView) ()
- (BOOL)isTransparentForUserInput;
- (void)textInputContextKeyboardSelectionDidChangeNotification:(NSNotification *)textInputContextKeyboardSelectionDidChangeNotification;
@end
@implementation QT_MANGLE_NAMESPACE(QNSView) {
@ -297,15 +298,6 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
return focusWindow;
}
- (void)textInputContextKeyboardSelectionDidChangeNotification : (NSNotification *) textInputContextKeyboardSelectionDidChangeNotification
{
Q_UNUSED(textInputContextKeyboardSelectionDidChangeNotification)
if (([NSApp keyWindow] == [self window]) && [[self window] firstResponder] == self) {
QCocoaInputContext *ic = qobject_cast<QCocoaInputContext *>(QCocoaIntegration::instance()->inputContext());
ic->updateLocale();
}
}
- (void)viewDidHide
{
if (!m_platformWindow->isExposed())
@ -1842,6 +1834,15 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
return @[NSUnderlineColorAttributeName, NSUnderlineStyleAttributeName];
}
- (void)textInputContextKeyboardSelectionDidChangeNotification:(NSNotification *)textInputContextKeyboardSelectionDidChangeNotification
{
Q_UNUSED(textInputContextKeyboardSelectionDidChangeNotification)
if (([NSApp keyWindow] == self.window) && self.window.firstResponder == self) {
QCocoaInputContext *ic = qobject_cast<QCocoaInputContext *>(QCocoaIntegration::instance()->inputContext());
ic->updateLocale();
}
}
-(void)registerDragTypes
{
QMacAutoReleasePool pool;