mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 05:58:27 +02:00
Stub out missing Script JSDoc
This commit is contained in:
parent
b09247d191
commit
0e478de1a2
2 changed files with 36 additions and 1 deletions
|
@ -359,6 +359,7 @@ public:
|
||||||
* @param {boolean} [deleteScriptCache=false]
|
* @param {boolean} [deleteScriptCache=false]
|
||||||
*/
|
*/
|
||||||
Q_INVOKABLE void resetModuleCache(bool deleteScriptCache = false);
|
Q_INVOKABLE void resetModuleCache(bool deleteScriptCache = false);
|
||||||
|
|
||||||
QScriptValue currentModule();
|
QScriptValue currentModule();
|
||||||
bool registerModuleWithParent(const QScriptValue& module, const QScriptValue& parent);
|
bool registerModuleWithParent(const QScriptValue& module, const QScriptValue& parent);
|
||||||
QScriptValue newModule(const QString& modulePath, const QScriptValue& parent = QScriptValue());
|
QScriptValue newModule(const QString& modulePath, const QScriptValue& parent = QScriptValue());
|
||||||
|
@ -496,7 +497,7 @@ public:
|
||||||
* @function Script.callEntityScriptMethod
|
* @function Script.callEntityScriptMethod
|
||||||
* @param {Uuid} entityID
|
* @param {Uuid} entityID
|
||||||
* @param {string} methodName
|
* @param {string} methodName
|
||||||
* @param {string[]} parameters
|
* @param {string[]} [parameters=[]]
|
||||||
* @param {Uuid} [remoteCallerID=Uuid.NULL]
|
* @param {Uuid} [remoteCallerID=Uuid.NULL]
|
||||||
*/
|
*/
|
||||||
Q_INVOKABLE void callEntityScriptMethod(const EntityItemID& entityID, const QString& methodName,
|
Q_INVOKABLE void callEntityScriptMethod(const EntityItemID& entityID, const QString& methodName,
|
||||||
|
@ -721,6 +722,7 @@ signals:
|
||||||
|
|
||||||
/**jsdoc
|
/**jsdoc
|
||||||
* @function Script.entityScriptPreloadFinished
|
* @function Script.entityScriptPreloadFinished
|
||||||
|
* @param {Uuid} entityID
|
||||||
* @returns {Signal}
|
* @returns {Signal}
|
||||||
*/
|
*/
|
||||||
// Emitted when an entity script has finished running preload
|
// Emitted when an entity script has finished running preload
|
||||||
|
|
|
@ -31,8 +31,29 @@ public:
|
||||||
|
|
||||||
BaseScriptEngine() {}
|
BaseScriptEngine() {}
|
||||||
|
|
||||||
|
/**jsdoc
|
||||||
|
* @function Script.lintScript
|
||||||
|
* @param {string} sourceCode
|
||||||
|
* @param {string} fileName
|
||||||
|
* @param {number} [lineNumber=1]
|
||||||
|
* @returns {object}
|
||||||
|
*/
|
||||||
Q_INVOKABLE QScriptValue lintScript(const QString& sourceCode, const QString& fileName, const int lineNumber = 1);
|
Q_INVOKABLE QScriptValue lintScript(const QString& sourceCode, const QString& fileName, const int lineNumber = 1);
|
||||||
|
|
||||||
|
/**jsdoc
|
||||||
|
* @function Script.makeError
|
||||||
|
* @param {object} [other]
|
||||||
|
* @param {string} [type="Error"]
|
||||||
|
* @returns {object}
|
||||||
|
*/
|
||||||
Q_INVOKABLE QScriptValue makeError(const QScriptValue& other = QScriptValue(), const QString& type = "Error");
|
Q_INVOKABLE QScriptValue makeError(const QScriptValue& other = QScriptValue(), const QString& type = "Error");
|
||||||
|
|
||||||
|
/**jsdoc
|
||||||
|
* @function Script.formatExecption
|
||||||
|
* @param {object} exception
|
||||||
|
* @param {boolean} inludeExtendeDetails
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
Q_INVOKABLE QString formatException(const QScriptValue& exception, bool includeExtendedDetails);
|
Q_INVOKABLE QString formatException(const QScriptValue& exception, bool includeExtendedDetails);
|
||||||
|
|
||||||
QScriptValue cloneUncaughtException(const QString& detail = QString());
|
QScriptValue cloneUncaughtException(const QString& detail = QString());
|
||||||
|
@ -48,6 +69,18 @@ public:
|
||||||
// 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);
|
||||||
signals:
|
signals:
|
||||||
|
/**jsdoc
|
||||||
|
* @function Script.signalHandlerException
|
||||||
|
* @param {object} exception
|
||||||
|
* @returns {Signal}
|
||||||
|
*/
|
||||||
|
// Script.signalHandlerException is exposed by QScriptEngine.
|
||||||
|
|
||||||
|
/**jsdoc
|
||||||
|
* @function Script.unhandledException
|
||||||
|
* @param {object} exception
|
||||||
|
* @returns {Signal}
|
||||||
|
*/
|
||||||
void unhandledException(const QScriptValue& exception);
|
void unhandledException(const QScriptValue& exception);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
Loading…
Reference in a new issue