mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 04:07:11 +02:00
Make ScriptEngine a QObject instead of the derived class
Fix signal -- only needs to be in ScriptEngine
This commit is contained in:
parent
67e7a7375a
commit
8d6270392d
2 changed files with 3 additions and 9 deletions
|
@ -71,7 +71,8 @@ inline T scriptvalue_cast(const ScriptValue& value);
|
|||
* To inject an exception into the running script, use raiseException(). This may result in the script
|
||||
* not capturing it and an uncaughtException happening as a result.
|
||||
*/
|
||||
class ScriptEngine {
|
||||
class ScriptEngine : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
ScriptEngine(ScriptManager *manager = nullptr) : _manager(manager) {
|
||||
|
|
|
@ -57,7 +57,7 @@ const double GARBAGE_COLLECTION_TIME_LIMIT_S = 1.0;
|
|||
Q_DECLARE_METATYPE(ScriptEngine::FunctionSignature)
|
||||
|
||||
/// [V8] Implements ScriptEngine for V8 and translates calls for QScriptEngine
|
||||
class ScriptEngineV8 final : public QObject, public ScriptEngine,
|
||||
class ScriptEngineV8 final : public ScriptEngine,
|
||||
public std::enable_shared_from_this<ScriptEngineV8> {
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -215,13 +215,6 @@ protected:
|
|||
const ValueOwnership& ownership = AutoOwnership);*/
|
||||
|
||||
void registerSystemTypes();
|
||||
signals:
|
||||
/**
|
||||
* @brief The script being run threw an exception
|
||||
*
|
||||
* @param exception Exception that was thrown
|
||||
*/
|
||||
void exception(std::shared_ptr<ScriptException> exception);
|
||||
|
||||
protected:
|
||||
static QMutex _v8InitMutex;
|
||||
|
|
Loading…
Reference in a new issue