MCPcopy Create free account
hub / github.com/comaps/comaps / GetCurrentInputLocale

Method GetCurrentInputLocale

qt/search_panel.cpp:210–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210std::string SearchPanel::GetCurrentInputLocale()
211{
212 /// @DebugNote
213 // Hardcode search input language.
214 // return "de";
215
216 QString loc = QGuiApplication::inputMethod()->locale().name();
217 loc.replace('_', '-');
218 auto res = loc.toStdString();
219 if (CategoriesHolder::MapLocaleToInteger(res) < 0)
220 res = "en";
221 return res;
222}
223
224void SearchPanel::OnSearchTextChanged(QString const & str)
225{

Callers

nothing calls this directly

Calls 1

nameMethod · 0.45

Tested by

no test coverage detected