From 6c5f996974483f9ed33d941cd5caefb2e025bffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 19 Aug 2021 16:48:54 +0200 Subject: macOS: Ensure we provide a preedit format for non-attributed strings The logic was not taking into account that we were always adding an QInputMethodEvent::Cursor attribute, so we would never hit the fallback code. Pick-to: 6.2 Change-Id: I25bd725025152241a55e3fea60444c20e27db4f9 Reviewed-by: Volker Hilsheimer --- src/plugins/platforms/cocoa/qnsview_complextext.mm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/plugins/platforms/cocoa/qnsview_complextext.mm') diff --git a/src/plugins/platforms/cocoa/qnsview_complextext.mm b/src/plugins/platforms/cocoa/qnsview_complextext.mm index 154eded15c..040f65250a 100644 --- a/src/plugins/platforms/cocoa/qnsview_complextext.mm +++ b/src/plugins/platforms/cocoa/qnsview_complextext.mm @@ -159,9 +159,7 @@ } index = effectiveRange.location + effectiveRange.length; } - } - - if (attrs.isEmpty()) { + } else { QTextCharFormat format; format.setFontUnderline(true); attrs<