Showing the changes to libraries/script-engine/src/ScriptEngines.cpp (1 of 2 files). Show all
Unified · Split
| @@ -209,6 +209,18 @@ void ScriptEngines::shutdownScripting() { · 208 unmodified lines | ||
| 209 | 209 | qCDebug(scriptengine) << "DONE Stopping all scripts...."; |
| 210 | 210 | } |
| 211 | 211 | |
| 212 | +/**jsdoc | |
| 213 | + * Information on a public script, i.e., a script that's included in the Interface installation. | |
| 214 | + * @typedef {object} ScriptDiscoveryService.PublicScript | |
| 215 | + * @property {string} name - The script's file name. | |
| 216 | + * @property {string} type - <code>"script"</code> or <code>"folder"</code>. | |
| 217 | + * <p class="important">Deprecated: This property is deprecated and will be removed. It currently always has the value, | |
| 218 | + * <code>"script"</code>.</p> | |
| 219 | + * @property {ScriptDiscoveryService.PublicScript[]} [children] - Only present if <code>type</code> is <code>"folder"</code>. | |
| 220 | + * <p class="important">Deprecated: This property is deprecated and will be removed. It currently is never present. | |
| 221 | + * @property {string} [url] - The full URL of the script — including the <code>"file:///"</code> scheme at the start. | |
| 222 | + * <p>Only present if <code>type</code> is <code>"script"</code>.</p> | |
| 223 | + */ | |
| 212 | 224 | QVariantList getPublicChildNodes(TreeNodeFolder* parent) { |
| 213 | 225 | QVariantList result; |
| 214 | 226 | QList<TreeNodeBase*> treeNodes = getScriptsModel().getFolderNodes(parent); |
| @@ -240,6 +252,13 @@ QVariantList ScriptEngines::getPublic() { · 25 unmodified lines | ||
| 240 | 252 | return getPublicChildNodes(NULL); |
| 241 | 253 | } |
| 242 | 254 | |
| 255 | +/**jsdoc | |
| 256 | + * Information on a local script. | |
| 257 | + * @typedef {object} ScriptDiscoveryService.LocalScript | |
| 258 | + * @property {string} name - The script's file name. | |
| 259 | + * @property {string} path - The script's path. | |
| 260 | + * @deprecated This type is deprecated and will be removed. | |
| 261 | + */ | |
| 243 | 262 | QVariantList ScriptEngines::getLocal() { |
| 244 | 263 | QVariantList result; |
| 245 | 264 | QList<TreeNodeBase*> treeNodes = getScriptsModel().getFolderNodes(NULL); |
| @@ -260,6 +279,15 @@ QVariantList ScriptEngines::getLocal() { · 14 unmodified lines | ||
| 260 | 279 | return result; |
| 261 | 280 | } |
| 262 | 281 | |
| 282 | +/**jsdoc | |
| 283 | + * Information on a running script. | |
| 284 | + * @typedef {object} ScriptDiscoveryService.RunningScript | |
| 285 | + * @property {boolean} local - <code>true</code> if the script is a local file (i.e., the scheme is "file"), <code>false</code> | |
| 286 | + * if it isn't (e.g., the scheme is "http"). | |
| 287 | + * @property {string} name - The script's file name. | |
| 288 | + * @property {string} path - The script's path and file name — excluding the scheme if a local file. | |
| 289 | + * @property {string} url - The full URL of the script — including the scheme if a local file. | |
| 290 | + */ | |
| 263 | 291 | QVariantList ScriptEngines::getRunning() { |
| 264 | 292 | QVariantList result; |
| 265 | 293 | auto runningScripts = getRunningScripts(); |