mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 04:37:23 +02:00
more shifting around of ScriptEngineQtScript declaration
This commit is contained in:
parent
69566fa924
commit
4389fd1e68
1 changed files with 9 additions and 8 deletions
|
@ -46,6 +46,14 @@ class ScriptEngineQtScript final : public QScriptEngine,
|
||||||
public QEnableSharedFromThis<ScriptEngineQtScript> {
|
public QEnableSharedFromThis<ScriptEngineQtScript> {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
public: // construction
|
||||||
|
ScriptEngineQtScript(ScriptManager* scriptManager = nullptr);
|
||||||
|
~ScriptEngineQtScript();
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// NOTE - these are NOT intended to be public interfaces available to scripts, the are only Q_INVOKABLE so we can
|
||||||
|
// properly ensure they are only called on the correct thread
|
||||||
|
|
||||||
public: // ScriptEngine implementation
|
public: // ScriptEngine implementation
|
||||||
virtual void abortEvaluation() override;
|
virtual void abortEvaluation() override;
|
||||||
virtual void clearExceptions() override;
|
virtual void clearExceptions() override;
|
||||||
|
@ -120,14 +128,7 @@ protected: // brought over from BaseScriptEngine
|
||||||
// helper to detect and log warnings when other code invokes QScriptEngine/BaseScriptEngine in thread-unsafe ways
|
// helper to detect and log warnings when other code invokes QScriptEngine/BaseScriptEngine in thread-unsafe ways
|
||||||
static bool IS_THREADSAFE_INVOCATION(const QThread* thread, const QString& method);
|
static bool IS_THREADSAFE_INVOCATION(const QThread* thread, const QString& method);
|
||||||
|
|
||||||
public:
|
public: // public non-interface methods for other QtScript-specific classes to use
|
||||||
ScriptEngineQtScript(ScriptManager* scriptManager = nullptr);
|
|
||||||
~ScriptEngineQtScript();
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// NOTE - these are NOT intended to be public interfaces available to scripts, the are only Q_INVOKABLE so we can
|
|
||||||
// properly ensure they are only called on the correct thread
|
|
||||||
|
|
||||||
/// registers a global getter/setter
|
/// registers a global getter/setter
|
||||||
Q_INVOKABLE void registerGetterSetter(const QString& name, QScriptEngine::FunctionSignature getter,
|
Q_INVOKABLE void registerGetterSetter(const QString& name, QScriptEngine::FunctionSignature getter,
|
||||||
QScriptEngine::FunctionSignature setter, const QString& parent = QString(""));
|
QScriptEngine::FunctionSignature setter, const QString& parent = QString(""));
|
||||||
|
|
Loading…
Reference in a new issue