| 4252 | } |
| 4253 | |
| 4254 | void Widget::inputMethodEvent(QInputMethodEvent *e) { |
| 4255 | const auto cursor = _search->rawTextEdit()->textCursor(); |
| 4256 | bool isGettingInput = !e->commitString().isEmpty() |
| 4257 | || e->preeditString() != cursor.block().layout()->preeditAreaText() |
| 4258 | || e->replacementLength() > 0; |
| 4259 | |
| 4260 | if (!isGettingInput || _postponeProcessSearchFocusChange) { |
| 4261 | Window::AbstractSectionWidget::inputMethodEvent(e); |
| 4262 | return; |
| 4263 | } |
| 4264 | |
| 4265 | // This delay in search focus processing allows us not to create |
| 4266 | // _suggestions in case the event inserts some non-whitespace search |
| 4267 | // query while still show _suggestions animated, if it is a space. |
| 4268 | _postponeProcessSearchFocusChange = true; |
| 4269 | _search->setFocusFast(); |
| 4270 | QCoreApplication::sendEvent(_search->rawTextEdit(), e); |
| 4271 | _postponeProcessSearchFocusChange = false; |
| 4272 | processSearchFocusChange(); |
| 4273 | } |
| 4274 | |
| 4275 | QVariant Widget::inputMethodQuery(Qt::InputMethodQuery query) const { |
| 4276 | return _search->rawTextEdit()->inputMethodQuery(query); |
nothing calls this directly
no test coverage detected