Showing the changes to interface/src/scripting/TestScriptingInterface.cpp (1 of 4 files). Show all
Unified · Split
| @@ -162,8 +162,7 @@ void TestScriptingInterface::clearCaches() { · 161 unmodified lines | |||
| 162 | 162 | ||
| 163 | // Writes a JSON object from javascript to a file | 163 | // Writes a JSON object from javascript to a file |
| 164 | void TestScriptingInterface::saveObject(QVariant variant, const QString& filename) { | 164 | void TestScriptingInterface::saveObject(QVariant variant, const QString& filename) { |
| 165 | QString testResultsLocation = qApp->getTestResultsLocation(); | 165 | if (_testResultsLocation.isNull()) { |
| 166 | if (testResultsLocation.isNull()) { | ||
| 167 | return; | 166 | return; |
| 168 | } | 167 | } |
| 169 | 168 | ||
| @@ -176,11 +175,11 @@ void TestScriptingInterface::saveObject(QVariant variant, const QString& filenam · 6 unmodified lines | |||
| 176 | QByteArray jsonData = jsonDocument.toJson(); | 175 | QByteArray jsonData = jsonDocument.toJson(); |
| 177 | 176 | ||
| 178 | // Append trailing slash if needed | 177 | // Append trailing slash if needed |
| 179 | if (testResultsLocation.right(1) != "/") { | 178 | if (_testResultsLocation.right(1) != "/") { |
| 180 | testResultsLocation += "/"; | 179 | _testResultsLocation += "/"; |
| 181 | } | 180 | } |
| 182 | 181 | ||
| 183 | QString filepath = QDir::cleanPath(testResultsLocation + filename); | 182 | QString filepath = QDir::cleanPath(_testResultsLocation + filename); |
| 184 | QFile file(filepath); | 183 | QFile file(filepath); |
| 185 | 184 | ||
| 186 | file.open(QFile::WriteOnly); | 185 | file.open(QFile::WriteOnly); |