macOS: Simplify validAttributesForMarkedText
We don't need to condition this on IM enablement. The attributes are only used if we are actually marking text, which only happens for IM enabled views. Pick-to: 6.2 Change-Id: I47377cf53cf2bf44a1d9513d317f82c73f083fa3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
70df6052d8
commit
993d8025dc
@ -183,16 +183,7 @@
|
||||
|
||||
- (NSArray<NSString *> *)validAttributesForMarkedText
|
||||
{
|
||||
if (!m_platformWindow)
|
||||
return nil;
|
||||
|
||||
if (m_platformWindow->window() != QGuiApplication::focusWindow())
|
||||
return nil;
|
||||
|
||||
if (queryInputMethod(m_platformWindow->window()->focusObject()))
|
||||
return @[NSUnderlineColorAttributeName, NSUnderlineStyleAttributeName];
|
||||
else
|
||||
return nil;
|
||||
return @[NSUnderlineColorAttributeName, NSUnderlineStyleAttributeName];
|
||||
}
|
||||
|
||||
- (BOOL)hasMarkedText
|
||||
|
Loading…
Reference in New Issue
Block a user