| 166 | } |
| 167 | |
| 168 | QString EncodingUtils::detectFileEncoding(const QString &filename) const { |
| 169 | QFile f(filename); |
| 170 | if (f.open(QIODevice::ReadOnly | QIODevice::Text)) { |
| 171 | QString enc = detectBufferEncoding(f.readAll()); |
| 172 | f.close(); |
| 173 | return enc; |
| 174 | } |
| 175 | return ""; |
| 176 | } |
no test coverage detected