Showing the changes to interface/src/scripting/TestScriptingInterface.cpp (1 of 4 files). Show all
Unified · Split
| @@ -11,11 +11,12 @@ · 10 unmodified lines | |||
| 11 | #include <QtCore/QLoggingCategory> | 11 | #include <QtCore/QLoggingCategory> |
| 12 | #include <QtCore/QThread> | 12 | #include <QtCore/QThread> |
| 13 | 13 | ||
| 14 | #include <shared/FileUtils.h> | ||
| 14 | #include <shared/QtHelpers.h> | 15 | #include <shared/QtHelpers.h> |
| 15 | #include <DependencyManager.h> | 16 | #include <DependencyManager.h> |
| 16 | #include <Trace.h> | ||
| 17 | #include <StatTracker.h> | ||
| 18 | #include <OffscreenUi.h> | 17 | #include <OffscreenUi.h> |
| 18 | #include <StatTracker.h> | ||
| 19 | #include <Trace.h> | ||
| 19 | 20 | ||
| 20 | #include "Application.h" | 21 | #include "Application.h" |
| 21 | 22 | ||
| @@ -141,8 +142,13 @@ void TestScriptingInterface::endTraceEvent(QString name) { · 119 unmodified lines | |||
| 141 | tracing::traceEvent(trace_test(), name, tracing::DurationEnd); | 142 | tracing::traceEvent(trace_test(), name, tracing::DurationEnd); |
| 142 | } | 143 | } |
| 143 | 144 | ||
| 144 | void TestScriptingInterface::savePhysicsSimulationStats(QString filename) { | 145 | void TestScriptingInterface::savePhysicsSimulationStats(QString originalPath) { |
| 145 | qApp->saveNextPhysicsStats(filename); | 146 | QString path = FileUtils::replaceDateTimeTokens(originalPath); |
| 147 | path = FileUtils::computeDocumentPath(path); | ||
| 148 | if (!FileUtils::canCreateFile(path)) { | ||
| 149 | return; | ||
| 150 | } | ||
| 151 | qApp->saveNextPhysicsStats(path); | ||
| 146 | } | 152 | } |
| 147 | 153 | ||
| 148 | void TestScriptingInterface::profileRange(const QString& name, QScriptValue fn) { | 154 | void TestScriptingInterface::profileRange(const QString& name, QScriptValue fn) { |