Showing the changes to libraries/script-engine/src/qtscript/ScriptEngineQtScript.h (1 of 1 file). Show all
Unified · Split
| @@ -46,6 +46,14 @@ class ScriptEngineQtScript final : public QScriptEngine, · 45 unmodified lines | |||
| 46 | public QEnableSharedFromThis<ScriptEngineQtScript> { | 46 | public QEnableSharedFromThis<ScriptEngineQtScript> { |
| 47 | Q_OBJECT | 47 | Q_OBJECT |
| 48 | 48 | ||
| 49 | public: // construction | ||
| 50 | ScriptEngineQtScript(ScriptManager* scriptManager = nullptr); | ||
| 51 | ~ScriptEngineQtScript(); | ||
| 52 | |||
| 53 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 54 | // NOTE - these are NOT intended to be public interfaces available to scripts, the are only Q_INVOKABLE so we can | ||
| 55 | // properly ensure they are only called on the correct thread | ||
| 56 | |||
| 49 | public: // ScriptEngine implementation | 57 | public: // ScriptEngine implementation |
| 50 | virtual void abortEvaluation() override; | 58 | virtual void abortEvaluation() override; |
| 51 | virtual void clearExceptions() override; | 59 | virtual void clearExceptions() override; |
| @@ -120,14 +128,7 @@ protected: // brought over from BaseScriptEngine · 68 unmodified lines | |||
| 120 | // helper to detect and log warnings when other code invokes QScriptEngine/BaseScriptEngine in thread-unsafe ways | 128 | // helper to detect and log warnings when other code invokes QScriptEngine/BaseScriptEngine in thread-unsafe ways |
| 121 | static bool IS_THREADSAFE_INVOCATION(const QThread* thread, const QString& method); | 129 | static bool IS_THREADSAFE_INVOCATION(const QThread* thread, const QString& method); |
| 122 | 130 | ||
| 123 | public: | 131 | public: // public non-interface methods for other QtScript-specific classes to use |
| 124 | ScriptEngineQtScript(ScriptManager* scriptManager = nullptr); | ||
| 125 | ~ScriptEngineQtScript(); | ||
| 126 | |||
| 127 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 128 | // NOTE - these are NOT intended to be public interfaces available to scripts, the are only Q_INVOKABLE so we can | ||
| 129 | // properly ensure they are only called on the correct thread | ||
| 130 | |||
| 131 | /// registers a global getter/setter | 132 | /// registers a global getter/setter |
| 132 | Q_INVOKABLE void registerGetterSetter(const QString& name, QScriptEngine::FunctionSignature getter, | 133 | Q_INVOKABLE void registerGetterSetter(const QString& name, QScriptEngine::FunctionSignature getter, |
| 133 | QScriptEngine::FunctionSignature setter, const QString& parent = QString("")); | 134 | QScriptEngine::FunctionSignature setter, const QString& parent = QString("")); |