History

Moved ownership of test location into the Test Scripting class.

NissimHadar committed 8 years ago

Commit d4d2f3c1 parent 8e3844a4 files · +15 −15Browse files

Showing the changes to interface/src/scripting/TestScriptingInterface.cpp (1 of 4 files). Show all

Unified · Split

interface/src/scripting/TestScriptingInterface.cpp+4−5
@@ -162,8 +162,7 @@ void TestScriptingInterface::clearCaches() { · 161 unmodified lines
162162
163163 // Writes a JSON object from javascript to a file
164164 void TestScriptingInterface::saveObject(QVariant variant, const QString& filename) {
165− QString testResultsLocation = qApp->getTestResultsLocation();
166− if (testResultsLocation.isNull()) {
165+ if (_testResultsLocation.isNull()) {
167166 return;
168167 }
169168
@@ -176,11 +175,11 @@ void TestScriptingInterface::saveObject(QVariant variant, const QString& filenam · 6 unmodified lines
176175 QByteArray jsonData = jsonDocument.toJson();
177176
178177 // Append trailing slash if needed
179− if (testResultsLocation.right(1) != "/") {
180− testResultsLocation += "/";
178+ if (_testResultsLocation.right(1) != "/") {
179+ _testResultsLocation += "/";
181180 }
182181
183− QString filepath = QDir::cleanPath(testResultsLocation + filename);
182+ QString filepath = QDir::cleanPath(_testResultsLocation + filename);
184183 QFile file(filepath);
185184
186185 file.open(QFile::WriteOnly);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t