Cocoa: Make dictation via speech recognition work
Returning NSNotFound from the NSTextInputClient selectedRange
implementation when there is no selection prevents
dictation from activating (for unknown reasons).
Return an empty {0, 0} range instead. Text input
methods such as Pinyin still work after this change.
[ChangeLog][macOS] Speech to text dictation now works
for Qt text input.
Change-Id: Ibf1729bdd271e8ed5ce3c9d2a0373c8ab3613d8e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
bb10
parent
291eba6f80
commit
246fe27187
|
|
@ -1783,9 +1783,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
|
|||
|
||||
- (NSRange) selectedRange
|
||||
{
|
||||
NSRange selectedRange = {NSNotFound, 0};
|
||||
selectedRange.location = NSNotFound;
|
||||
selectedRange.length = 0;
|
||||
NSRange selectedRange = {0, 0};
|
||||
|
||||
QObject *fo = QGuiApplication::focusObject();
|
||||
if (!fo)
|
||||
|
|
|
|||
Loading…
Reference in New Issue