From eb49cf71e45c8b0cc566f43717729c265124220a Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Wed, 25 Feb 2015 12:15:38 +0100 Subject: Doc: add docs for ScriptEngine methods Fix the formatting of a list. Change-Id: I93bcd369f5e685fecacab632b801084199b06d4b Reviewed-by: Karsten Heimrich --- src/libs/installer/scriptengine.cpp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'src/libs') diff --git a/src/libs/installer/scriptengine.cpp b/src/libs/installer/scriptengine.cpp index 6f2c562c7..19e5e313b 100644 --- a/src/libs/installer/scriptengine.cpp +++ b/src/libs/installer/scriptengine.cpp @@ -51,6 +51,11 @@ namespace QInstaller { \brief The ScriptEngine class is used to prepare and run the component scripts. */ +/*! + \fn ScriptEngine::globalObject() const + Returns a global object. +*/ + /*! \qmltype console \inqmlmodule scripting @@ -587,9 +592,12 @@ ScriptEngine::ScriptEngine(PackageManagerCore *core) : available as properties of the created QJSValue. In addition some helper methods and properties are added: - findChild(), findChildren() recursively search for child objects with the given object name. - - Direct child objects are made accessible as properties under their respective object names. + \list + \li findChild(), findChildren() recursively search for child objects with the given + object name. + \li Direct child objects are made accessible as properties under their respective object + names. + \endlist */ QJSValue ScriptEngine::newQObject(QObject *object) { @@ -618,6 +626,10 @@ QJSValue ScriptEngine::newQObject(QObject *object) return jsValue; } +/*! + Evaluates \a program, using \a lineNumber as the base line number, and returns the results of + the evaluation. \a fileName is used for error reporting. +*/ QJSValue ScriptEngine::evaluate(const QString &program, const QString &fileName, int lineNumber) { return m_engine.evaluate(program, fileName, lineNumber); @@ -650,6 +662,8 @@ void ScriptEngine::removeFromGlobalObject(QObject *object) script. For more information, see \l {Component Scripting}. Throws Error when either the script at \a fileName could not be opened, or the QScriptEngine could not evaluate the script. + + TODO: document \a scriptInjection. */ QJSValue ScriptEngine::loadInContext(const QString &context, const QString &fileName, const QString &scriptInjection) -- cgit v1.2.3