summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptvalue/testgen/testgenerator.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qscriptvalue/testgen/testgenerator.h')
-rw-r--r--tests/auto/qscriptvalue/testgen/testgenerator.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/tests/auto/qscriptvalue/testgen/testgenerator.h b/tests/auto/qscriptvalue/testgen/testgenerator.h
index 8f4a357..1c61fc5 100644
--- a/tests/auto/qscriptvalue/testgen/testgenerator.h
+++ b/tests/auto/qscriptvalue/testgen/testgenerator.h
@@ -49,13 +49,10 @@
class TestGenerator {
public:
TestGenerator(QString& outputpath)
- : m_ofile(outputpath)
+ : m_opath(outputpath)
{
- // Open output file
- if (!m_ofile.open(QIODevice::WriteOnly | QIODevice::Text)) {
- qWarning() << "Can't open output file: " << outputpath;
- exit(2);
- }
+ if (!m_opath.endsWith('/'))
+ m_opath.append('/');
m_tempFile.open();
}
@@ -67,10 +64,10 @@ public:
}
void prepareData();
- QString generateTest();
- void save(const QString& data);
+ QHash<QString, QString> generateTest();
+ void save(const QHash<QString, QString>& data);
private:
- QFile m_ofile;
+ QString m_opath;
QTemporaryFile m_tempFile;
};