| 468 | QString engAlphabetUpper = engAlphabet.toUpper(); |
| 469 | |
| 470 | void initializeKeyboardSwitch() { |
| 471 | if (fastRusKeyboardSwitch.isEmpty()) { |
| 472 | QString rusAlphabet = "йцукенгшщзхъфывапролджэячсмитьбю"; |
| 473 | QString rusAlphabetUpper = rusAlphabet.toUpper(); |
| 474 | for (int i = 0; i < rusAlphabet.size(); ++i) { |
| 475 | fastRusKeyboardSwitch.insert(engAlphabetUpper[i], rusAlphabetUpper[i]); |
| 476 | fastRusKeyboardSwitch.insert(engAlphabet[i], rusAlphabet[i]); |
| 477 | fastRusKeyboardSwitch.insert(rusAlphabetUpper[i], engAlphabetUpper[i]); |
| 478 | fastRusKeyboardSwitch.insert(rusAlphabet[i], engAlphabet[i]); |
| 479 | } |
| 480 | } |
| 481 | if (fastUkrKeyboardSwitch.isEmpty()) { |
| 482 | QString ukrAlphabet = "йцукенгшщзхїфівапролджєячсмитьбю"; |
| 483 | QString ukrAlphabetUpper = ukrAlphabet.toUpper(); |
| 484 | for (int i = 0; i < ukrAlphabet.size(); ++i) { |
| 485 | fastUkrKeyboardSwitch.insert(engAlphabetUpper[i], ukrAlphabetUpper[i]); |
| 486 | fastUkrKeyboardSwitch.insert(engAlphabet[i], ukrAlphabet[i]); |
| 487 | fastUkrKeyboardSwitch.insert(ukrAlphabetUpper[i], engAlphabetUpper[i]); |
| 488 | fastUkrKeyboardSwitch.insert(ukrAlphabet[i], engAlphabet[i]); |
| 489 | } |
| 490 | } |
| 491 | } |
| 492 | |
| 493 | QString switchKeyboardLayout(const QString& from, QHash<QChar, QChar>& keyboardSwitch) { |
| 494 | QString result; |
no test coverage detected