summaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@theqtcompany.com>2015-02-25 12:15:38 +0100
committerLeena Miettinen <riitta-leena.miettinen@theqtcompany.com>2015-02-25 12:14:33 +0000
commiteb49cf71e45c8b0cc566f43717729c265124220a (patch)
treeb4d26fed7b6831cc5ce61ba8df0ad6e25aff06f5 /src/libs
parent10b05d813ee29c5436282fa0f0e1606619a13d2a (diff)
Doc: add docs for ScriptEngine methods
Fix the formatting of a list. Change-Id: I93bcd369f5e685fecacab632b801084199b06d4b Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/installer/scriptengine.cpp20
1 files changed, 17 insertions, 3 deletions
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
@@ -52,6 +52,11 @@ namespace QInstaller {
*/
/*!
+ \fn ScriptEngine::globalObject() const
+ Returns a global object.
+*/
+
+/*!
\qmltype console
\inqmlmodule scripting
\brief Provides methods for logging and debugging.
@@ -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)