add printFile function

This commit is contained in:
hysios hu 2012-09-23 18:17:50 +08:00
parent 065e69b09f
commit 1079c71369
2 changed files with 9 additions and 0 deletions

View File

@ -164,6 +164,14 @@ void Runner::print(const QString &fh, const QString &content) {
}
}
void Runner::printFile(const QString &fileName, const QString &content) {
QFile *outputFile = new QFile(fileName);
outputFile->open(QIODevice::WriteOnly);
QTextStream ts(outputFile);
ts << qPrintable(content);
ts.flush();
}
void Runner::finishSuite() {
isFinished = true;
runs = 0;

View File

@ -40,6 +40,7 @@ class Runner: public QObject {
QString getSeed();
void print(const QString &fh, const QString &content);
void printFile(const QString &fileName, const QString &content);
void finishSuite();
void ping();