mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 06:17:28 +02:00
Register more metatypes -- more work needed
This commit is contained in:
parent
b1e2a94d71
commit
de02da5fda
2 changed files with 22 additions and 1 deletions
|
@ -175,3 +175,12 @@ inline QDebug operator<<(QDebug debug, std::shared_ptr<ScriptException> e) {
|
||||||
debug << *e.get();
|
debug << *e.get();
|
||||||
return debug;
|
return debug;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Q_DECLARE_METATYPE(ScriptException)
|
||||||
|
Q_DECLARE_METATYPE(ScriptEngineException)
|
||||||
|
Q_DECLARE_METATYPE(ScriptRuntimeException)
|
||||||
|
|
||||||
|
Q_DECLARE_METATYPE(std::shared_ptr<ScriptException>)
|
||||||
|
Q_DECLARE_METATYPE(std::shared_ptr<ScriptEngineException>)
|
||||||
|
Q_DECLARE_METATYPE(std::shared_ptr<ScriptRuntimeException>)
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,21 @@
|
||||||
|
|
||||||
#include "ScriptManager.h"
|
#include "ScriptManager.h"
|
||||||
#include "ScriptManagerScriptingInterface.h"
|
#include "ScriptManagerScriptingInterface.h"
|
||||||
|
#include <QMetaType>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ScriptManagerScriptingInterface::ScriptManagerScriptingInterface(ScriptManager *parent): QObject(parent), _manager(parent) {
|
ScriptManagerScriptingInterface::ScriptManagerScriptingInterface(ScriptManager *parent): QObject(parent), _manager(parent) {
|
||||||
|
|
||||||
|
qRegisterMetaType<ScriptException>();
|
||||||
|
qRegisterMetaType<ScriptEngineException>();
|
||||||
|
qRegisterMetaType<ScriptRuntimeException>();
|
||||||
|
|
||||||
|
qRegisterMetaType<std::shared_ptr<ScriptException>>();
|
||||||
|
qRegisterMetaType<std::shared_ptr<ScriptEngineException>>();
|
||||||
|
qRegisterMetaType<std::shared_ptr<ScriptRuntimeException>>();
|
||||||
|
|
||||||
|
|
||||||
connect(_manager, &ScriptManager::scriptLoaded, this, &ScriptManagerScriptingInterface::scriptLoaded);
|
connect(_manager, &ScriptManager::scriptLoaded, this, &ScriptManagerScriptingInterface::scriptLoaded);
|
||||||
connect(_manager, &ScriptManager::errorLoadingScript, this, &ScriptManagerScriptingInterface::errorLoadingScript);
|
connect(_manager, &ScriptManager::errorLoadingScript, this, &ScriptManagerScriptingInterface::errorLoadingScript);
|
||||||
connect(_manager, &ScriptManager::update, this, &ScriptManagerScriptingInterface::update);
|
connect(_manager, &ScriptManager::update, this, &ScriptManagerScriptingInterface::update);
|
||||||
|
|
Loading…
Reference in a new issue