diff options
author | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-05-27 15:29:15 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@theqtcompany.com> | 2015-05-29 12:16:21 +0000 |
commit | 3557b1650c1c4f71947da0ec78e38ffe436f0cb0 (patch) | |
tree | 3fa239a015c9bc5b5ae05ba6567d0c2d6776b9b6 /doc/scripting-api | |
parent | 096238ca83e401c17677e7948ac7fec2dddedb46 (diff) |
Doc: Clarify use of addOperation
Make it explicit that addOperation , addElevatedOperation should be
usually called from within createOperations().
Change-Id: Id14339b1259716825a9443cc563449025674976f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Diffstat (limited to 'doc/scripting-api')
-rw-r--r-- | doc/scripting-api/component.qdoc | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/doc/scripting-api/component.qdoc b/doc/scripting-api/component.qdoc index 56e97f483..8e38c7e92 100644 --- a/doc/scripting-api/component.qdoc +++ b/doc/scripting-api/component.qdoc @@ -250,12 +250,20 @@ \qmlmethod void component::createOperations() Creates all operations needed to install this component. - You can override this method by providing a method with the same name in the component script. + You can override this method by providing a method with the same name in the component script: - \note If you call this method from a script, it will not call the script's - method with the same name. + \code + Component.prototype.createOperations = function() + { + // call default implementation + component.createOperations(); + // ... add custom operations + } + \endcode The default implementation calls createOperationsForArchive for all archives in this component. + + \sa component::addOperation() */ /*! @@ -307,17 +315,19 @@ */ /*! - \qmlmethod boolean component::addOperation(string operation, string parameter1 = "", string parameter2 = "", ..., string parameter10 = "") - - Convenience method for calling addOperation(string, stringlist) with up to 10 arguments. -*/ - -/*! \qmlmethod boolean component::addOperation(string operation, stringlist parameters) Creates and adds an installation operation for \a operation. Add any number of parameters. The contents of the parameters get variables like "@TargetDir@" replaced with their values, if contained. + + The method is typically called from within \l component::createOperations(). +*/ + +/*! + \qmlmethod boolean component::addOperation(string operation, string parameter1 = "", string parameter2 = "", ..., string parameter10 = "") + + Convenience method for calling addOperation(string, stringlist) with up to 10 arguments. */ /*! |