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

Function switchKeyboardLayout

Telegram/SourceFiles/core/utils.cpp:493–505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

491}
492
493QString switchKeyboardLayout(const QString& from, QHash<QChar, QChar>& keyboardSwitch) {
494 QString result;
495 result.reserve(from.size());
496 for (QString::const_iterator i = from.cbegin(), e = from.cend(); i != e; ++i) {
497 QHash<QChar, QChar>::const_iterator j = keyboardSwitch.constFind(*i);
498 if (j == keyboardSwitch.cend()) {
499 result += *i;
500 } else {
501 result += j.value();
502 }
503 }
504 return result;
505}
506
507QString rusKeyboardLayoutSwitch(const QString& from) {
508 initializeKeyboardSwitch();

Callers 1

rusKeyboardLayoutSwitchFunction · 0.85

Calls 4

sizeMethod · 0.45
cbeginMethod · 0.45
cendMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected