| 125 | } |
| 126 | |
| 127 | void XcaApplication::switchLanguage(QAction* a) |
| 128 | { |
| 129 | QLocale lang = a->data().toLocale(); |
| 130 | setupLanguage(lang); |
| 131 | |
| 132 | QFile file(defaultlang()); |
| 133 | |
| 134 | if (lang == QLocale::system()) { |
| 135 | file.remove(); |
| 136 | return; |
| 137 | } |
| 138 | |
| 139 | if (file.open(QIODevice::WriteOnly)) { |
| 140 | file.write(lang.name().toUtf8()); |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | bool XcaApplication::eventFilter(QObject *watched, QEvent *ev) |
| 145 | { |
nothing calls this directly
no test coverage detected