diff --git a/src/plugins/platforms/cocoa/qnsview_complextext.mm b/src/plugins/platforms/cocoa/qnsview_complextext.mm index a60f42bca8..154eded15c 100644 --- a/src/plugins/platforms/cocoa/qnsview_complextext.mm +++ b/src/plugins/platforms/cocoa/qnsview_complextext.mm @@ -183,16 +183,7 @@ - (NSArray *)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