From a050b55190c4f83255be09416e79debd0772a4fd Mon Sep 17 00:00:00 2001 From: Karsten Heimrich Date: Wed, 27 May 2015 14:22:44 +0200 Subject: Fix missing details output in example. Commit 17e29fc8d3 introduced a behavior change, the installer.components is no longer a array property, it is now a function returning an array. Update docs. Change-Id: I4fcdee6cff4572012236e1ac0768013a1e5689ac Reviewed-by: Leena Miettinen Reviewed-by: Kai Koehne --- doc/scripting-api/packagemanagercore.qdoc | 6 +++++- .../org.qtproject.ifw.example.dynamicpage/meta/installscript.js | 7 ++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/doc/scripting-api/packagemanagercore.qdoc b/doc/scripting-api/packagemanagercore.qdoc index 817f43b8a..c65ddce58 100644 --- a/doc/scripting-api/packagemanagercore.qdoc +++ b/doc/scripting-api/packagemanagercore.qdoc @@ -33,7 +33,11 @@ */ /*! - \qmlproperty array installer::components + \qmlmethod array installer::components() + + Returns an array of all available components. + + \sa component */ /*! diff --git a/examples/dynamicpage/packages/org.qtproject.ifw.example.dynamicpage/meta/installscript.js b/examples/dynamicpage/packages/org.qtproject.ifw.example.dynamicpage/meta/installscript.js index 66fc7de18..8b7da2dd0 100644 --- a/examples/dynamicpage/packages/org.qtproject.ifw.example.dynamicpage/meta/installscript.js +++ b/examples/dynamicpage/packages/org.qtproject.ifw.example.dynamicpage/meta/installscript.js @@ -162,9 +162,10 @@ Component.prototype.readyToInstallWidgetEntered = function () { var widget = gui.pageWidgetByObjectName("DynamicReadyToInstallWidget"); if (widget != null) { var html = "Components to install:
    "; - for (i = 0; i < installer.components.length; ++i) { - if (installer.components[i].installationRequested()) - html = html + "
  • " + installer.components[i].displayName + "
  • " + var components = installer.components(); + for (i = 0; i < components.length; ++i) { + if (components[i].installationRequested()) + html = html + "
  • " + components[i].displayName + "
  • " } html = html + "
"; widget.showDetailsBrowser.html = html; -- cgit v1.2.3