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 | 163 | // Writes a JSON object from javascript to a file |
| 164 | 164 | void TestScriptingInterface::saveObject(QVariant variant, const QString& filename) { |
| 165 | − QString testResultsLocation = qApp->getTestResultsLocation(); | |
| 166 | − if (testResultsLocation.isNull()) { | |
| 165 | + if (_testResultsLocation.isNull()) { | |
| 167 | 166 | return; |
| 168 | 167 | } |
| 169 | 168 | |
| @@ -176,11 +175,11 @@ void TestScriptingInterface::saveObject(QVariant variant, const QString& filenam · 6 unmodified lines | ||
| 176 | 175 | QByteArray jsonData = jsonDocument.toJson(); |
| 177 | 176 | |
| 178 | 177 | // Append trailing slash if needed |
| 179 | − if (testResultsLocation.right(1) != "/") { | |
| 180 | − testResultsLocation += "/"; | |
| 178 | + if (_testResultsLocation.right(1) != "/") { | |
| 179 | + _testResultsLocation += "/"; | |
| 181 | 180 | } |
| 182 | 181 | |
| 183 | − QString filepath = QDir::cleanPath(testResultsLocation + filename); | |
| 182 | + QString filepath = QDir::cleanPath(_testResultsLocation + filename); | |
| 184 | 183 | QFile file(filepath); |
| 185 | 184 | |
| 186 | 185 | file.open(QFile::WriteOnly); |