File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed
score-plugin-engine/Execution Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ using exec_setup_fun
3030class SCORE_PLUGIN_ENGINE_EXPORT ExecutionController : public QObject
3131{
3232public:
33- ExecutionController (const score::GUIApplicationContext& ctx);
33+ explicit ExecutionController (const score::GUIApplicationContext& ctx);
3434 ~ExecutionController ();
3535
3636 TransportInterface& transport () const noexcept ;
Original file line number Diff line number Diff line change @@ -294,6 +294,9 @@ class SCORE_PLUGIN_JS_EXPORT EditJsContext : public QObject
294294 void scrub (double z);
295295 W_SLOT (scrub)
296296
297+ QObject* transport ();
298+ W_INVOKABLE (transport)
299+
297300 // //////////////
298301 // / File API ///
299302 QString readFile (QString path);
Original file line number Diff line number Diff line change 66
77#include < Engine/ApplicationPlugin.hpp>
88#include < JS/Qml/EditContext.hpp>
9+
10+ #include < Transport/DocumentPlugin.hpp>
911namespace JS
1012{
1113
@@ -90,4 +92,11 @@ void EditJsContext::scrub(double dx)
9092{
9193 // TODO
9294}
95+ QObject* EditJsContext::transport ()
96+ {
97+ auto doc = ctx ();
98+ if (!doc)
99+ return nullptr ;
100+ return doc->findPlugin <Transport::DocumentPlugin>();
101+ }
93102}
You can’t perform that action at this time.
0 commit comments