Write (or overwrite) a file with the given content.
| 11 | |
| 12 | // Write (or overwrite) a file with the given content. |
| 13 | static void writeFile(const QString &path, const QString &content) |
| 14 | { |
| 15 | QFile f(path); |
| 16 | if (!f.open(QIODevice::WriteOnly | QIODevice::Text | |
| 17 | QIODevice::Truncate)) { |
| 18 | return; |
| 19 | } |
| 20 | QTextStream(&f) << content; |
| 21 | } |
| 22 | |
| 23 | // --------------------------------------------------------------------------- |
| 24 | // CONTENT_CHANGE |
no test coverage detected