| 21 | } |
| 22 | |
| 23 | void SubtitleLanguage::setLanguage(QString source) { |
| 24 | idx = -1; |
| 25 | |
| 26 | if (source.length() == 2) { |
| 27 | idx = codes2l.indexOf(source.toLower()); |
| 28 | } else if (source.length() == 3) { |
| 29 | idx = codes3l.indexOf(source.toLower()); |
| 30 | } else { |
| 31 | idx = names.indexOf(source); |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | QString SubtitleLanguage::toTwoLetter() { |
| 36 | if (idx > -1) { |
no outgoing calls
no test coverage detected