MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / setSearchQuery

Method setSearchQuery

Telegram/SourceFiles/dialogs/dialogs_widget.cpp:4432–4446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4430}
4431
4432void Widget::setSearchQuery(const QString &query, int cursorPosition) {
4433 if (query.isEmpty()) {
4434 clearSearchField();
4435 return;
4436 }
4437 if (cursorPosition < 0) {
4438 cursorPosition = query.size();
4439 }
4440 if (_subsectionTopBar) {
4441 _subsectionTopBar->searchSetText(query, cursorPosition);
4442 } else {
4443 _search->setText(query);
4444 _search->setCursorPosition(cursorPosition);
4445 }
4446}
4447
4448bool Widget::cancelSearch(CancelSearchOptions options) {
4449 const auto clearingSuggestionsQuery = _suggestions

Callers

nothing calls this directly

Calls 4

searchSetTextMethod · 0.80
isEmptyMethod · 0.45
sizeMethod · 0.45
setTextMethod · 0.45

Tested by

no test coverage detected