From e77604b187b1ecadbabf3e18a3b67d7519a7b881 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Wed, 6 May 2015 16:03:35 +0200 Subject: Doc: link from C++ API ref to scripting API ref Remove duplicated text where possible, and unify the text if it is needed in both files (by QDoc). Change-Id: If0c62a4a4abf6c1f61fd24f7947b9bc9bfb14f63 Reviewed-by: Karsten Heimrich --- src/libs/installer/component.cpp | 92 +++++++++++++++++++++++++--------------- 1 file changed, 58 insertions(+), 34 deletions(-) (limited to 'src/libs') diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp index e2a9cf2e1..957aced03 100644 --- a/src/libs/installer/component.cpp +++ b/src/libs/installer/component.cpp @@ -134,7 +134,7 @@ static const QLatin1String scForcedInstallation("ForcedInstallation"); The URLs are prefixed with \c {installer://}. - \sa addDownloadableArchive, removeDownloadableArchive + \sa addDownloadableArchive(), removeDownloadableArchive() */ /*! @@ -186,13 +186,15 @@ static const QLatin1String scForcedInstallation("ForcedInstallation"); /*! \fn Component::loaded() - Emitted when the component has been loaded. + \sa {component::loaded}{component.loaded} */ /*! \fn Component::selectedChanged(bool selected) Emitted when the component selection changes to \a selected. + + \sa {component::selectedChanged}{component.selectedChanged} */ /*! @@ -200,13 +202,13 @@ static const QLatin1String scForcedInstallation("ForcedInstallation"); Emitted when the value of the variable with the name \a key changes to \a value. - \sa setValue + \sa {component::valueChanged}{component.valueChanged}, setValue() */ /*! \fn Component::virtualStateChanged() - Emitted when the virtual state of the component changes. + \sa {component::virtualStateChanged}{component.virtualStateChanged} */ @@ -385,7 +387,9 @@ QString Component::value(const QString &key, const QString &defaultValue) const } /*! - Sets the value of the variable \a key to \a value. + Sets the value of the variable with \a key to \a value. + + \sa {component::setValue}{component.setValue} */ void Component::setValue(const QString &key, const QString &value) { @@ -654,6 +658,8 @@ QHash > Component::licenses() const /*! Returns the QWidget created for \a name or \c 0 if the widget has been deleted or cannot be found. + + \sa {component::userInterface}{component.userInterface} */ QWidget *Component::userInterface(const QString &name) const { @@ -663,7 +669,7 @@ QWidget *Component::userInterface(const QString &name) const /*! Creates all operations needed to install this component's \a path. \a path is a fully qualified filename including the component's name. This method gets called from - Component::createOperationsForArchive. You can override it by providing a method with + createOperationsForArchive. You can override it by providing a method with the same name in the component script. \note RSA signature files are omitted by this method. @@ -672,6 +678,8 @@ QWidget *Component::userInterface(const QString &name) const The default implementation is recursively creating Copy and Mkdir operations for all files and folders within \a path. + + \sa {component::createOperationsForPath}{component.createOperationsForPath} */ void Component::createOperationsForPath(const QString &path) { @@ -716,6 +724,8 @@ void Component::createOperationsForPath(const QString &path) The default implementation calls createOperationsForPath for everything contained in the archive. If \a archive is a compressed archive known to the installer system, an Extract operation is created, instead. + + \sa {component::createOperationsForArchive}{component.createOperationsForArchive} */ void Component::createOperationsForArchive(const QString &archive) { @@ -742,18 +752,7 @@ void Component::createOperationsForArchive(const QString &archive) } /*! - Starts the component installation. - You can override this method by providing a method with the same name in the component script. - - \code - Component.prototype.beginInstallation = function() - { - // call default implementation - component.beginInstallation(); - // ... - } - \endcode - + \sa {component::beginInstallation}{component.beginInstallation} */ void Component::beginInstallation() { @@ -762,14 +761,8 @@ void Component::beginInstallation() } /*! - 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. - - \note If you call this method from a script, it will not call the script's method with the same - name. - - The default implementation calls createOperationsForArchive() for all archives in this - component. + \sa {component::createOperations}{component.createOperations} + \sa createOperationsForArchive() */ void Component::createOperations() { @@ -790,6 +783,8 @@ void Component::createOperations() Registers the file or directory at \a path for being removed when this component gets uninstalled. In case of a directory, this will be recursive. If \a wipe is set to \c true, the directory will also be deleted if it contains changes made by the user after installation. + + \sa {component::registerPathForUninstallation}{component.registerPathForUninstallation} */ void Component::registerPathForUninstallation(const QString &path, bool wipe) { @@ -823,7 +818,8 @@ QStringList Component::archives() const downloaded from an online repository. When adding \a path, it will be downloaded from the repository when the installation starts. - \sa removeDownloadableArchive, fromOnlineRepository, archives + \sa {component::addDownloadableArchive}{component.addDownloadableArchive} + \sa removeDownloadableArchive(), fromOnlineRepository, archives */ void Component::addDownloadableArchive(const QString &path) { @@ -837,7 +833,8 @@ void Component::addDownloadableArchive(const QString &path) Removes the archive \a path previously added via addDownloadableArchive() from this component. This can only be called if this component was downloaded from an online repository. - \sa addDownloadableArchive, fromOnlineRepository, archives + \sa {component::removeDownloadableArchive}{component.removeDownloadableArchive} + \sa addDownloadableArchive(), fromOnlineRepository, archives */ void Component::removeDownloadableArchive(const QString &path) { @@ -856,6 +853,8 @@ QStringList Component::downloadableArchives() const /*! Adds a request for quitting the process \a process before installing, updating, or uninstalling the component. + + \sa {component::addStopProcessForUpdateRequest}{component.addStopProcessForUpdateRequest} */ void Component::addStopProcessForUpdateRequest(const QString &process) { @@ -864,6 +863,8 @@ void Component::addStopProcessForUpdateRequest(const QString &process) /*! Removes the request for quitting the process \a process again. + + \sa {component::removeStopProcessForUpdateRequest}{component.removeStopProcessForUpdateRequest} */ void Component::removeStopProcessForUpdateRequest(const QString &process) { @@ -873,6 +874,8 @@ void Component::removeStopProcessForUpdateRequest(const QString &process) /*! A convenience function for adding or removing the request for stopping \a process depending on whether \a requested is \c true (add) or \c false (remove). + + \sa {component::setStopProcessForUpdateRequest}{component.addStopProcessForUpdateReques} */ void Component::setStopProcessForUpdateRequest(const QString &process, bool requested) { @@ -1008,6 +1011,8 @@ Operation *Component::createOperation(const QString &operationName, const QStrin Convenience method for calling the operation \a operation with up to ten parameters: \a parameter1, \a parameter2, \a parameter3, \a parameter4, \a parameter5, \a parameter6, \a parameter7, \a parameter8, \a parameter9, and \a parameter10. + + \sa {component::addOperation}{component.addOperation} */ bool Component::addOperation(const QString &operation, const QString ¶meter1, const QString ¶meter2, const QString ¶meter3, const QString ¶meter4, const QString ¶meter5, const QString ¶meter6, @@ -1041,6 +1046,8 @@ bool Component::addOperation(const QString &operation, const QStringList ¶me Convenience method for calling the elevated operation \a operation with up to ten parameters: \a parameter1, \a parameter2, \a parameter3, \a parameter4, \a parameter5, \a parameter6, \a parameter7, \a parameter8, \a parameter9, and \a parameter10. + + \sa {component::addElevatedOperation}{component.addElevatedOperation} */ bool Component::addElevatedOperation(const QString &operation, const QString ¶meter1, const QString ¶meter2, const QString ¶meter3, const QString ¶meter4, const QString ¶meter5, @@ -1076,6 +1083,8 @@ bool Component::addElevatedOperation(const QString &operation, const QStringList Specifies whether operations should be automatically created when the installation starts. This would be done by calling createOperations(). If you set this to \c false, it is completely up to the component's script to create all operations. + + \sa {component::autoCreateOperations}{component.autoCreateOperations} */ bool Component::autoCreateOperations() const { @@ -1133,6 +1142,7 @@ bool Component::validatePage() /*! Adds the component specified by \a newDependency to the list of dependencies. + \sa {component::addDependency}{component.addDependency} \sa dependencies */ @@ -1156,8 +1166,7 @@ QStringList Component::autoDependencies() const } /*! - - Sets the component's state to installed. + \sa {component::setInstalled}{component.setInstalled} */ void Component::setInstalled() { @@ -1168,6 +1177,8 @@ void Component::setInstalled() Determines whether the component comes as an auto dependency. Returns \c true if all components in \a componentsToInstall are already installed or selected for installation and this component thus needs to be installed as well. + + \sa {component::isAutoDependOn}{component.isAutoDependOn} */ bool Component::isAutoDependOn(const QSet &componentsToInstall) const { @@ -1227,7 +1238,9 @@ bool Component::isInstalled() const } /*! - Returns whether the user wants to install the component + Returns whether the user wants to install the component. + + \sa {component::installationRequested}{component.installationRequested} */ bool Component::installationRequested() const { @@ -1244,6 +1257,8 @@ bool Component::isSelectedForInstallation() const /*! Sets the \a isUpdateAvailable flag to \c true to indicate that the core found an update. + + \sa {component::setUpdateAvailable}{component.setUpdateAvailable} */ void Component::setUpdateAvailable(bool isUpdateAvailable) { @@ -1251,7 +1266,9 @@ void Component::setUpdateAvailable(bool isUpdateAvailable) } /*! - Returns whether the user wants to install the update for this component + Returns whether the user wants to install the update for this component. + + \sa {component::updateRequested}{component.updateRequested} */ bool Component::updateRequested() { @@ -1260,6 +1277,8 @@ bool Component::updateRequested() /*! Returns \c true if that component will be changed (update, installation, or uninstallation). + + \sa {component::componentChangeRequested}{component.componentChangeRequested} */ bool Component::componentChangeRequested() { @@ -1268,7 +1287,7 @@ bool Component::componentChangeRequested() /*! - Sets the component state to uninstalled. + \sa {component::setUninstalled}{component.setUninstalled} */ void Component::setUninstalled() { @@ -1277,6 +1296,8 @@ void Component::setUninstalled() /*! Returns whether the component is uninstalled. + + \sa {component::isUninstalled}{component.isUninstalled} */ bool Component::isUninstalled() const { @@ -1285,6 +1306,8 @@ bool Component::isUninstalled() const /*! Returns whether the user wants to uninstall the component. + + \sa {component::uninstallationRequested}{component.uninstallationRequested} */ bool Component::uninstallationRequested() const { @@ -1296,7 +1319,8 @@ bool Component::uninstallationRequested() const /*! Returns whether this component has been loaded from an online repository. - \sa addDownloadableArchive, fromOnlineRepository + \sa {component::isFromOnlineRepository}{component.isFromOnlineRepository} + \sa addDownloadableArchive(), fromOnlineRepository */ bool Component::isFromOnlineRepository() const { -- cgit v1.2.3