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 <volker.hilsheimer@qt.io>
bb10
Tor Arne Vestbø 2021-08-19 16:48:54 +02:00
parent 993d8025dc
commit 6c5f996974
1 changed files with 1 additions and 3 deletions

View File

@ -159,9 +159,7 @@
}
index = effectiveRange.location + effectiveRange.length;
}
}
if (attrs.isEmpty()) {
} else {
QTextCharFormat format;
format.setFontUnderline(true);
attrs<<QInputMethodEvent::Attribute(QInputMethodEvent::TextFormat,