mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-06 21:03:42 +02:00
Register metatypes, fixes warnings
Remove executeOnScriptThread from Script JS API -- seems unused, is marked deprecated, and for some reason registration didn't resolve the warnings.
This commit is contained in:
parent
8f82750f2a
commit
aec756b0b9
2 changed files with 9 additions and 1 deletions
|
@ -261,6 +261,7 @@ ScriptManager::ScriptManager(Context context, const QString& scriptContents, con
|
|||
_fileNameString(fileNameString),
|
||||
_assetScriptingInterface(new AssetScriptingInterface(this))
|
||||
{
|
||||
|
||||
switch (_context) {
|
||||
case Context::CLIENT_SCRIPT:
|
||||
_type = Type::CLIENT;
|
||||
|
@ -279,6 +280,9 @@ ScriptManager::ScriptManager(Context context, const QString& scriptContents, con
|
|||
break;
|
||||
}
|
||||
|
||||
qRegisterMetaType<ScriptValue>();
|
||||
qRegisterMetaType<std::function<void()>>();
|
||||
|
||||
_scriptingInterface = std::make_shared<ScriptManagerScriptingInterface>(this);
|
||||
|
||||
if (isEntityServerScript()) {
|
||||
|
|
|
@ -672,7 +672,11 @@ protected:
|
|||
* @param {ConnectionType} [type=2] - Connection type.
|
||||
* @deprecated This function is deprecated and will be removed.
|
||||
*/
|
||||
Q_INVOKABLE void executeOnScriptThread(std::function<void()> function, const Qt::ConnectionType& type = Qt::QueuedConnection ) { _manager->executeOnScriptThread(function, type);}
|
||||
// V8TODO: Nothing seems to be using this, and it generates:
|
||||
// hifi.scriptengine: Parameter 1 in method ScriptManagerScriptingInterface :: "executeOnScriptThread" is of type QMetaType::UnknownType
|
||||
// so removing for now.
|
||||
//
|
||||
// Q_INVOKABLE void executeOnScriptThread(std::function<void()> function, const Qt::ConnectionType& type = Qt::QueuedConnection ) { _manager->executeOnScriptThread(function, type);}
|
||||
|
||||
/**jsdoc
|
||||
* @function Script._requireResolve
|
||||
|
|
Loading…
Reference in a new issue