diff options
Diffstat (limited to 'doc/scripting-api/component.qdoc')
-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. */ /*! |