mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-14 06:46:39 +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]
|
||||
*/
|
||||
Q_INVOKABLE void resetModuleCache(bool deleteScriptCache = false);
|
||||
|
||||
QScriptValue currentModule();
|
||||
bool registerModuleWithParent(const QScriptValue& module, const QScriptValue& parent);
|
||||
QScriptValue newModule(const QString& modulePath, const QScriptValue& parent = QScriptValue());
|
||||
|
@ -496,7 +497,7 @@ public:
|
|||
* @function Script.callEntityScriptMethod
|
||||
* @param {Uuid} entityID
|
||||
* @param {string} methodName
|
||||
* @param {string[]} parameters
|
||||
* @param {string[]} [parameters=[]]
|
||||
* @param {Uuid} [remoteCallerID=Uuid.NULL]
|
||||
*/
|
||||
Q_INVOKABLE void callEntityScriptMethod(const EntityItemID& entityID, const QString& methodName,
|
||||
|
@ -721,6 +722,7 @@ signals:
|
|||
|
||||
/**jsdoc
|
||||
* @function Script.entityScriptPreloadFinished
|
||||
* @param {Uuid} entityID
|
||||
* @returns {Signal}
|
||||
*/
|
||||
// Emitted when an entity script has finished running preload
|
||||
|
|
|
@ -31,8 +31,29 @@ public:
|
|||
|
||||
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);
|
||||
|
||||
/**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");
|
||||
|
||||
/**jsdoc
|
||||
* @function Script.formatExecption
|
||||
* @param {object} exception
|
||||
* @param {boolean} inludeExtendeDetails
|
||||
* @returns {string}
|
||||
*/
|
||||
Q_INVOKABLE QString formatException(const QScriptValue& exception, bool includeExtendedDetails);
|
||||
|
||||
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
|
||||
static bool IS_THREADSAFE_INVOCATION(const QThread *thread, const QString& method);
|
||||
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);
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Reference in a new issue