File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ ProjectLoader::~ProjectLoader()
3434 if (m_loadThread.isRunning ())
3535 m_loadThread.waitForFinished ();
3636
37- if (m_engine) {
37+ if (m_engine && m_eventLoopEnabled ) {
3838 m_engine->stopEventLoop ();
3939 m_eventLoop.waitForFinished ();
4040 }
@@ -88,6 +88,12 @@ IEngine *ProjectLoader::engine() const
8888 return m_engine;
8989}
9090
91+ // NOTE: This should be only used for testing
92+ void ProjectLoader::setEngine (libscratchcpp::IEngine *engine)
93+ {
94+ m_engine = engine;
95+ }
96+
9197StageModel *ProjectLoader::stage ()
9298{
9399 if (m_loadThread.isRunning ())
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ class ProjectLoader : public QObject
4141 bool loadStatus () const ;
4242
4343 libscratchcpp::IEngine *engine () const ;
44+ void setEngine (libscratchcpp::IEngine *engine);
4445
4546 StageModel *stage ();
4647
You can’t perform that action at this time.
0 commit comments