MCPcopy Create free account
hub / github.com/QNapi/qnapi / writeFile

Method writeFile

libqnapi/src/subconvert/subtitleconverter.cpp:198–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

196}
197
198bool SubtitleConverter::writeFile(const QString &filename, QString encoding,
199 const QStringList &lines) const {
200 QFile outputFile(filename);
201 if (outputFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
202 QTextStream out(&outputFile);
203 out.setCodec(qPrintable(encoding));
204 foreach (QString line, lines) { out << line << "\n"; }
205 outputFile.close();
206 return true;
207 } else {
208 return false;
209 }
210}

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected