summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorkh1 <karsten.heimrich@digia.com>2014-10-07 15:05:08 +0200
committerKarsten Heimrich <karsten.heimrich@digia.com>2014-10-08 16:36:21 +0200
commit8ea9ccf39b47c57b432786b4b2fb135f56e53dde (patch)
tree82d0006dfd83b0ab6d8deb3385b83200164061dc /src
parent241141938dc07bb3915d48eebf2f56c13261edeb (diff)
Fix c++ documentation creation. Add, fix inline documentation.
Change-Id: Idd6805afbf5736eebf03c2d1ca6dae272c519634 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Niels Weber <niels.weber@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/libs/installer/component.cpp138
-rw-r--r--src/libs/installer/componentmodel.cpp69
-rw-r--r--src/libs/installer/messageboxhandler.cpp11
-rw-r--r--src/libs/installer/packagemanagercore.cpp222
-rw-r--r--src/libs/installer/packagemanagergui.cpp17
-rw-r--r--src/libs/installer/scriptengine.cpp203
-rw-r--r--src/libs/kdtools/kdupdaterapplication.cpp2
-rw-r--r--src/libs/kdtools/kdupdaterfiledownloader.cpp6
-rw-r--r--src/libs/kdtools/kdupdaterfiledownloaderfactory.cpp6
-rw-r--r--src/libs/kdtools/kdupdaterpackagesinfo.cpp4
-rw-r--r--src/libs/kdtools/kdupdatertask.cpp2
-rw-r--r--src/libs/kdtools/kdupdaterupdate.cpp2
-rw-r--r--src/libs/kdtools/kdupdaterupdatefinder.cpp4
-rw-r--r--src/libs/kdtools/kdupdaterupdateoperation.cpp6
-rw-r--r--src/libs/kdtools/kdupdaterupdateoperationfactory.cpp6
-rw-r--r--src/libs/kdtools/kdupdaterupdatesourcesinfo.cpp6
16 files changed, 459 insertions, 245 deletions
diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp
index bdb3dfd60..5ae10b096 100644
--- a/src/libs/installer/component.cpp
+++ b/src/libs/installer/component.cpp
@@ -77,50 +77,77 @@ static const QLatin1String scCurrentState("CurrentState");
static const QLatin1String scForcedInstallation("ForcedInstallation");
/*!
- \qmltype Component
+ \qmltype component
\inqmlmodule scripting
- \brief Represents an installer component in Qt Script.
+ \brief The component type represents the current component that the Qt Script belongs to.
- The object represents the component an install script belongs to. It is accessible through the
- global \c component variable:
+ A minimal valid script needs to contain a constructor, which can look like this:
\code
function Component()
{
- print("component: " + component.displayName);
+ // Access the global component's name property and log it to the debug console.
+ console.log("component: " + component.displayName);
}
\endcode
+
+ The \c Component class and the script engine both modify the script before it is evaluated.
+ When the modifications are applied to the above snippet, the script changes to:
+
+ \code
+ (function() { [1]
+ var component = installer.componentByName('Component.Name.This.Script.Belongs.To'); [2]
+ function Component()
+ {
+ // Access the global component's name property and log it to the debug console.
+ console.log("component: " + component.displayName);
+ }
+
+ if (typeof Component != undefined) [1]
+ return new Component; [1]
+ else [1]
+ throw "Missing Component constructor. Please check your script." [1]
+ })();
+
+ [1] Changes done by the script engine.
+ [2] Changes done by the Component class.
+ \endcode
+
+ \note The \e component (in lower case) is the global variable the C++ \c Component class
+ introduced. The \e component variable represents the C++ \c Component object that the script
+ belongs to. The \e Component (in upper case) is a JavaScript object that gets instantiated by
+ the script engine.
*/
/*!
- \qmlproperty string Component::name
+ \qmlproperty string component::name
Returns the name of the component as set in the \c <Name> tag of the package
information file.
*/
/*!
- \qmlproperty string Component::displayName
+ \qmlproperty string component::displayName
Returns the name of the component as shown in the user interface.
*/
/*!
- \qmlproperty boolean Component::selected
+ \qmlproperty boolean component::selected
Indicates whether the component is currently selected.
*/
/*!
- \qmlproperty boolean Component::autoCreateOperations
+ \qmlproperty boolean component::autoCreateOperations
Specifies whether some standard operations for the component should be
automatically created when the installation starts. The default is \c true.
*/
/*!
- \qmlproperty stringlist Component::archives
+ \qmlproperty stringlist component::archives
Returns the list of archive URL's (prefixed with \c installer://) registered
for the component.
@@ -129,19 +156,19 @@ static const QLatin1String scForcedInstallation("ForcedInstallation");
*/
/*!
- \qmlproperty stringlist Component::dependencies
+ \qmlproperty stringlist component::dependencies
This read-only property contains components this component depends on.
*/
/*!
- \qmlproperty stringlist Component::autoDependencies
+ \qmlproperty stringlist component::autoDependencies
Returns the value of the \c <AutoDependsOn> tag in the package information file.
*/
/*!
- \qmlproperty boolean Component::fromOnlineRepository
+ \qmlproperty boolean component::fromOnlineRepository
Returns whether this component has been loaded from an online repository.
@@ -149,7 +176,7 @@ static const QLatin1String scForcedInstallation("ForcedInstallation");
*/
/*!
- \qmlproperty url Component::repositoryUrl
+ \qmlproperty url component::repositoryUrl
Returns the repository URL the component is downloaded from.
When this component is not downloaded from an online repository, returns an empty #QUrl.
@@ -157,7 +184,7 @@ static const QLatin1String scForcedInstallation("ForcedInstallation");
*/
/*!
- \qmlproperty boolean Component::default
+ \qmlproperty boolean component::default
This read-only property indicates if the component is a default one.
@@ -167,7 +194,7 @@ static const QLatin1String scForcedInstallation("ForcedInstallation");
*/
/*!
- \qmlproperty boolean Component::installed
+ \qmlproperty boolean component::installed
This read-only property returns if the component is installed.
@@ -175,26 +202,25 @@ static const QLatin1String scForcedInstallation("ForcedInstallation");
*/
/*!
- \qmlproperty boolean Component::enabled
+ \qmlproperty boolean component::enabled
Indicates whether the component is currently enabled. The property is both readable and writable.
*/
/*!
- \qmlsignal Component::loaded()
+ \qmlsignal component::loaded()
Emitted when the component has been loaded.
*/
-
/*!
- \qmlsignal Component::selectedChanged(boolean isSelected)
+ \qmlsignal component::selectedChanged(boolean isSelected)
Emitted when the component selection has changed to \a isSelected.
*/
/*!
- \qmlsignal Component::valueChanged(string key, string value)
+ \qmlsignal component::valueChanged(string key, string value)
Emitted when the variable with name \a key has changed to \a value.
@@ -350,7 +376,7 @@ QHash<QString,QString> Component::variables() const
}
/*!
- \qmlmethod string Component::value(string key, string value = "")
+ \qmlmethod string component::value(string key, string value = "")
Returns the value of variable name \a key. If \a key is not known yet, \a defaultValue is returned.
Note: If a component is virtual and you ask for the component value with key "Default", it will always
@@ -364,7 +390,7 @@ QString Component::value(const QString &key, const QString &defaultValue) const
}
/*!
- \qmlmethod void Component::setValue(string key, string value)
+ \qmlmethod void component::setValue(string key, string value)
Sets the value of the variable with \a key to \a value.
*/
@@ -605,7 +631,7 @@ void Component::loadLicenses(const QString &directory, const QHash<QString, QVar
/*!
- \qmlproperty stringlist Component::userInterfaces
+ \qmlproperty stringlist component::userInterfaces
Returns a list of all user interface class names known to this component.
*/
@@ -620,7 +646,7 @@ QHash<QString, QPair<QString, QString> > Component::licenses() const
}
/*!
- \qmlmethod QWidget Component::userInterface(string name)
+ \qmlmethod QWidget component::userInterface(string name)
Returns the QWidget created for \a name or 0 if the widget already has been deleted or cannot be found.
*/
@@ -630,11 +656,11 @@ QWidget *Component::userInterface(const QString &name) const
}
/*!
- \qmlmethod void Component::createOperationsForPath(string path)
+ \qmlmethod void component::createOperationsForPath(string path)
Creates all operations needed to install this component's \a path. \a path is a full qualified
filename including the component's name. This method gets called from
- Component::createOperationsForArchive. You can override it by providing a method with
+ component::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.
@@ -676,10 +702,10 @@ void Component::createOperationsForPath(const QString &path)
}
/*!
- \qmlmethod void Component::createOperationsForArchive(string archive)
+ \qmlmethod void component::createOperationsForArchive(string archive)
Creates all operations needed to install this component's \a archive. This method gets called
- from Component::createOperations. You can override this method by providing a method with the
+ from component::createOperations. 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 won't call the scripts method with the same name.
@@ -713,7 +739,7 @@ void Component::createOperationsForArchive(const QString &archive)
}
/*!
- \qmlmethod void Component::beginInstallation()
+ \qmlmethod void component::beginInstallation()
Starts the component installation.
You can override this method by providing a method with the same name in the component script.
@@ -735,7 +761,7 @@ void Component::beginInstallation()
}
/*!
- \qmlmethod void Component::createOperations()
+ \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.
@@ -760,7 +786,7 @@ void Component::createOperations()
}
/*!
- \qmlmethod void Component::registerPathForUninstallation(string path, boolean wipe = false)
+ \qmlmethod void component::registerPathForUninstallation(string path, boolean wipe = false)
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
@@ -794,7 +820,7 @@ QStringList Component::archives() const
}
/*!
- \qmlmethod void Component::addDownloadableArchive(string path)
+ \qmlmethod void component::addDownloadableArchive(string path)
Adds the archive \a path to this component. This can only be called when this component was
downloaded from an online repository. When adding \a path, it will be downloaded from the
@@ -811,7 +837,7 @@ void Component::addDownloadableArchive(const QString &path)
}
/*!
- \qmlmethod void Component::removeDownloadableArchive(string path)
+ \qmlmethod void component::removeDownloadableArchive(string path)
Removes the archive \a path previously added via addDownloadableArchive from this component.
This can only be called when this component was downloaded from an online repository.
@@ -833,7 +859,7 @@ QStringList Component::downloadableArchives() const
}
/*!
- \qmlmethod void Component::addStopProcessForUpdateRequest(string process)
+ \qmlmethod void component::addStopProcessForUpdateRequest(string process)
Adds a request for quitting the process \a process before installing/updating/uninstalling the
component.
@@ -844,7 +870,7 @@ void Component::addStopProcessForUpdateRequest(const QString &process)
}
/*!
- \qmlmethod void Component::removeStopProcessForUpdateRequest(string process)
+ \qmlmethod void component::removeStopProcessForUpdateRequest(string process)
Removes the request for quitting the process \a process again.
*/
@@ -854,7 +880,7 @@ void Component::removeStopProcessForUpdateRequest(const QString &process)
}
/*!
- \qmlmethod void Component::setStopProcessForUpdateRequest(string process, boolean requested)
+ \qmlmethod void component::setStopProcessForUpdateRequest(string process, boolean requested)
Convenience: Add/remove request depending on \a requested (add if \c true, remove if \c false).
*/
@@ -990,7 +1016,7 @@ Operation *Component::createOperation(const QString &operationName, const QStrin
}
/*!
- \qmlmethod boolean Component::addOperation(string operation, string parameter1 = "", string parameter2 = "", ..., string parameter10 = "")
+ \qmlmethod boolean component::addOperation(string operation, string parameter1 = "", string parameter2 = "", ..., string parameter10 = "")
Convenience method for calling addOperation(string, stringlist) with up to 10 arguments.
*/
@@ -1008,7 +1034,7 @@ bool Component::addOperation(const QString &operation, const QString &parameter1
}
/*!
- \qmlmethod boolean Component::addOperation(string operation, stringlist parameters)
+ \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,
@@ -1025,7 +1051,7 @@ bool Component::addOperation(const QString &operation, const QStringList &parame
}
/*!
- \qmlmethod boolean Component::addElevatedOperation(string operation, string parameter1 = "", string parameter2 = "", ..., string parameter10 = "")
+ \qmlmethod boolean component::addElevatedOperation(string operation, string parameter1 = "", string parameter2 = "", ..., string parameter10 = "")
Convenience method for calling addElevatedOperation(string, stringlist) with up to 10 arguments.
*/
@@ -1044,7 +1070,7 @@ bool Component::addElevatedOperation(const QString &operation, const QString &pa
}
/*!
- \qmlmethod boolean Component::addElevatedOperation(string operation, stringlist parameters)
+ \qmlmethod boolean component::addElevatedOperation(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,
@@ -1072,7 +1098,7 @@ bool Component::autoCreateOperations() const
}
/*!
- \qmlmethod void Component::setAutoCreateOperations(boolean autoCreateOperations)
+ \qmlmethod void component::setAutoCreateOperations(boolean autoCreateOperations)
Setter for the \l autoCreateOperations property.
*/
@@ -1112,7 +1138,7 @@ bool Component::validatePage()
}
/*!
- \qmlmethod void Component::setSelected(boolean selected)
+ \qmlmethod void component::setSelected(boolean selected)
Marks the component for installation. Emits the selectedChanged() signal if the check state changes.
@@ -1125,7 +1151,7 @@ void Component::setSelected(bool selected)
}
/*!
- \qmlmethod void Component::addDependency(string newDependency)
+ \qmlmethod void component::addDependency(string newDependency)
Adds a new component \a newDependency to the list of dependencies.
@@ -1160,7 +1186,7 @@ QStringList Component::autoDependencies() const
}
/*!
- \qmlmethod void Component::setInstalled()
+ \qmlmethod void component::setInstalled()
Set's the components state to installed.
*/
@@ -1170,7 +1196,7 @@ void Component::setInstalled()
}
/*!
- \qmlmethod boolean Component::isAutoDependOn(QSet<string> componentsToInstall)
+ \qmlmethod boolean component::isAutoDependOn(QSet<string> componentsToInstall)
Determines if the component comes as an auto dependency. Returns \c true if the component needs
to be installed.
@@ -1221,7 +1247,7 @@ bool Component::isAutoDependOn(const QSet<QString> &componentsToInstall) const
}
/*!
- \qmlmethod boolean Component::isDefault()
+ \qmlmethod boolean component::isDefault()
Indicates if the component is a default one.
@@ -1257,7 +1283,7 @@ bool Component::isDefault() const
}
/*!
- \qmlmethod boolean Component::isInstalled()
+ \qmlmethod boolean component::isInstalled()
Determines if the component is installed.
*/
@@ -1267,7 +1293,7 @@ bool Component::isInstalled() const
}
/*!
- \qmlmethod boolean Component::installationRequested()
+ \qmlmethod boolean component::installationRequested()
Determines if the user wants to install the component
*/
@@ -1277,7 +1303,7 @@ bool Component::installationRequested() const
}
/*!
- \qmlmethod void Component::setUpdateAvailable(boolean isUpdateAvailable)
+ \qmlmethod void component::setUpdateAvailable(boolean isUpdateAvailable)
Sets a flag that the core found an update
*/
@@ -1287,7 +1313,7 @@ void Component::setUpdateAvailable(bool isUpdateAvailable)
}
/*!
- \qmlmethod boolean Component::updateRequested()
+ \qmlmethod boolean component::updateRequested()
Determines if the user wants to install the update for this component
*/
@@ -1297,7 +1323,7 @@ bool Component::updateRequested()
}
/*!
- \qmlmethod boolean Component::componentChangeRequested()
+ \qmlmethod boolean component::componentChangeRequested()
Returns \c true if that component will be changed (update/installation/uninstallation).
*/
@@ -1308,7 +1334,7 @@ bool Component::componentChangeRequested()
/*!
- \qmlmethod void Component::setUninstalled()
+ \qmlmethod void component::setUninstalled()
Sets the component state to uninstalled.
*/
@@ -1318,7 +1344,7 @@ void Component::setUninstalled()
}
/*!
- \qmlmethod boolean Component::isUninstalled()
+ \qmlmethod boolean component::isUninstalled()
Determines if the component is uninstalled.
*/
@@ -1328,7 +1354,7 @@ bool Component::isUninstalled() const
}
/*!
- \qmlmethod boolean Component::uninstallationRequested()
+ \qmlmethod boolean component::uninstallationRequested()
Determines if the user wants to uninstall the component.
*/
@@ -1340,7 +1366,7 @@ bool Component::uninstallationRequested() const
}
/*!
- \qmlmethod boolean Component::isFromOnlineRepository()
+ \qmlmethod boolean component::isFromOnlineRepository()
Determines whether this component has been loaded from an online repository.
diff --git a/src/libs/installer/componentmodel.cpp b/src/libs/installer/componentmodel.cpp
index 98b6f884d..466b71707 100644
--- a/src/libs/installer/componentmodel.cpp
+++ b/src/libs/installer/componentmodel.cpp
@@ -47,18 +47,26 @@
namespace QInstaller {
/*!
- \fn void checkStateChanged(const QModelIndex &index)
+ \class QInstaller::ComponentModel
+ \inmodule QtInstallerFramework
+ \brief The ComponentModel class holds a data model for visual representation of available
+ components to install.
+*/
+
+/*!
+ \fn void ComponentModel::checkStateChanged(const QModelIndex &index)
- This signal is emitted whenever the check state of a component is changed. The \a index value indicates
- the QModelIndex representation of the component as seen from the model.
+ This signal is emitted whenever the check state of a component is changed. The \a index value
+ indicates the QModelIndex representation of the component as seen from the model.
*/
/*!
- \fn void checkStateChanged(QInstaller::ComponentModel::ModelState state)
+ \fn void ComponentModel::checkStateChanged(QInstaller::ComponentModel::ModelState state)
- This signal is emitted whenever the check state of a model is changed after all check state
- calculations have taken place. The \a state value indicates whether the model has its default checked
- state, all components are checked/ unchecked or some individual components checked state has changed.
+ This signal is emitted whenever the check state of a model is changed after all state
+ calculations have taken place. The \a state is a combination of \c ModelStateFlag values
+ indicating whether the model has its default checked state, all components are checked
+ or unchecked, or some individual component's checked state has changed.
*/
@@ -84,8 +92,8 @@ ComponentModel::~ComponentModel()
/*!
Returns the item flags for the given \a index.
- The class implementation returns a combination of flags that enables the item (Qt::ItemIsEnabled), allows
- it to be selected (Qt::ItemIsSelectable) and to be checked (Qt::ItemIsUserCheckable).
+ Returns a combination of flags that enables the item (Qt::ItemIsEnabled) and allows it to be
+ selected (Qt::ItemIsSelectable) and to be checked (Qt::ItemIsUserCheckable).
*/
Qt::ItemFlags ComponentModel::flags(const QModelIndex &index) const
{
@@ -99,8 +107,8 @@ Qt::ItemFlags ComponentModel::flags(const QModelIndex &index) const
}
/*!
- Returns the number of items under the given \a parent. When the parent is valid it means that rowCount
- is returning the number of items of parent.
+ Returns the number of items under the given \a parent. When the parent index is invalid the
+ returned value is the root item count.
*/
int ComponentModel::rowCount(const QModelIndex &parent) const
{
@@ -119,7 +127,7 @@ int ComponentModel::columnCount(const QModelIndex &parent) const
}
/*!
- Returns the parent of the child item with the given \a child. If the item has no parent, an invalid
+ Returns the parent item of the given \a child. If the item has no parent, an invalid
QModelIndex is returned.
*/
QModelIndex ComponentModel::parent(const QModelIndex &child) const
@@ -135,7 +143,8 @@ QModelIndex ComponentModel::parent(const QModelIndex &child) const
}
/*!
- Returns the index of the item in the model specified by the given \a row, \a column and \a parent index.
+ Returns the index of the item in the model specified by the given \a row, \a column, and
+ \a parent index.
*/
QModelIndex ComponentModel::index(int row, int column, const QModelIndex &parent) const
{
@@ -207,7 +216,8 @@ bool ComponentModel::setData(const QModelIndex &index, const QVariant &value, in
}
/*!
- Returns the data for the given \a role and \a section in the header with the specified \a orientation.
+ Returns the data for the given \a role and \a section in the header with the specified
+ \a orientation.
An \e invalid QVariant is returned if \a section is out of bounds,
\a orientation is not Qt::Horizontal
or \a role is anything else than Qt::DisplayRole.
@@ -220,9 +230,10 @@ QVariant ComponentModel::headerData(int section, Qt::Orientation orientation, in
}
/*!
- Sets the data for the given \a role and \a section in the header with the specified \a orientation to the
- \a value supplied. Returns true if the header's data was updated; otherwise returns false. The
- headerDataChanged() signal is emitted if the data was successfully set.
+ Sets the data for the given \a role and \a section in the header with the specified
+ \a orientation to the \a value supplied. Returns \c true if the header's data was updated;
+ otherwise returns \c false. The headerDataChanged() signal is emitted if the data was
+ successfully set.
\note Only Qt::Horizontal orientation is supported.
*/
@@ -262,8 +273,8 @@ QSet<Component *> ComponentModel::unchecked() const
}
/*!
- Returns a list of components whose check state can't be changed. If package manager core is run with no
- forced installation argument, the list will always be empty.
+ Returns a list of components whose check state cannot be changed. If package manager
+ core is run with no forced installation argument, the list will always be empty.
*/
QSet<Component *> ComponentModel::uncheckable() const
{
@@ -287,8 +298,9 @@ ComponentModel::ModelState ComponentModel::checkedState() const
}
/*!
- Translates between a given component \a name and its associated QModelIndex. Returns the QModelIndex
- that represents the component or an invalid QModelIndex if the component does not exist in the model.
+ Translates between a given component \a name and its associated QModelIndex. Returns the
+ QModelIndex that represents the component or an invalid QModelIndex if the component does
+ not exist in the model.
*/
QModelIndex ComponentModel::indexFromComponentName(const QString &name) const
{
@@ -300,8 +312,8 @@ QModelIndex ComponentModel::indexFromComponentName(const QString &name) const
}
/*!
- Translates between a given QModelIndex \a index and its associated Component. Returns the component if
- the index is valid or 0 if an invalid QModelIndex is given.
+ Translates between a given QModelIndex \a index and its associated Component.
+ Returns the component if the index is valid or 0 if an invalid QModelIndex is given.
*/
Component *ComponentModel::componentFromIndex(const QModelIndex &index) const
{
@@ -316,9 +328,9 @@ Component *ComponentModel::componentFromIndex(const QModelIndex &index) const
/*!
Sets the passed \a rootComponents to be the list of currently shown components.
- The model is repopulated and the individual component checked state is used to show the check mark in
- front of the visual component representation. The modelAboutToBeReset() and modelReset() signals are
- emitted.
+ The model is repopulated and the individual component checked state is used to show the check
+ mark in front of the visual component representation. The modelAboutToBeReset() and
+ modelReset() signals are emitted.
*/
void ComponentModel::setRootComponents(QList<QInstaller::Component*> rootComponents)
{
@@ -351,8 +363,9 @@ void ComponentModel::setRootComponents(QList<QInstaller::Component*> rootCompone
/*!
Sets the check state of every component in the model to be \a state.
- The ComponentModel::PartiallyChecked flag is ignored by this function. Note that components are not
- changed if they are not checkable. The dataChanged() and checkStateChanged() signals are emitted.
+ The ComponentModel::PartiallyChecked flag is ignored by this function. Note that components
+ are not changed if they are not checkable. The dataChanged() and checkStateChanged() signals
+ are emitted.
*/
void ComponentModel::setCheckedState(QInstaller::ComponentModel::ModelStateFlag state)
{
diff --git a/src/libs/installer/messageboxhandler.cpp b/src/libs/installer/messageboxhandler.cpp
index 0992e4140..b8b74b302 100644
--- a/src/libs/installer/messageboxhandler.cpp
+++ b/src/libs/installer/messageboxhandler.cpp
@@ -51,8 +51,8 @@
\qmltype QMessageBox
\inqmlmodule scripting
- \brief The QMessageBox type provides a modal dialog for informing the
- user or asking the user a question and receiving an answer.
+ \brief The QMessageBox type provides a modal dialog for informing the user or asking the user
+ a question and receiving an answer.
\code
@@ -91,10 +91,9 @@
\section2 Scripted Installations
Sometimes it is useful to automatically close message boxes, for example during a scripted
- installation. This can be achieved by calling
- Installer::setMessageBoxAutomaticAnswer, Installer::autoAcceptMessageBoxes,
- Installer::autoRejectMessageBoxes. The \c identifier argument in the method calls
- allows to identify specific message boxes for this purpose.
+ installation. This can be achieved by calling installer::setMessageBoxAutomaticAnswer,
+ installer::autoAcceptMessageBoxes or installer::autoRejectMessageBoxes. The \c identifier
+ argument in the method calls allows to identify specific message boxes for this purpose.
*/
diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp
index 79cb80261..a9e7f7216 100644
--- a/src/libs/installer/packagemanagercore.cpp
+++ b/src/libs/installer/packagemanagercore.cpp
@@ -81,72 +81,42 @@
#include <QStandardPaths>
/*!
- \qmltype QInstaller
+ \qmltype installer
\inqmlmodule scripting
- \brief Provides access to the installer from Qt Script.
-
- Use the \c installer object in the global namespace to access functionality of the installer.
-
- \section2 Wizard Pages
-
- The installer has various pre-defined pages that can be used to for example insert pages
- in a certain place:
- \list
- \li QInstaller.Introduction
- \li QInstaller.TargetDirectory
- \li QInstaller.ComponentSelection
- \li QInstaller.LicenseCheck
- \li QInstaller.StartMenuSelection
- \li QInstaller.ReadyForInstallation
- \li QInstaller.PerformInstallation
- \li QInstaller.InstallationFinished
- \li QInstaller.End
- \endlist
+ \brief The installer type provides access to core functionality of the Qt Installer Framework.
*/
-
/*!
- \qmlproperty enumeration QInstaller::status
-
- Status of the installer.
-
- Possible values are:
- \list
- \li QInstaller.Success (deprecated: QInstaller.InstallerSucceeded)
- \li QInstaller.Failure (deprecated: QInstaller.InstallerFailed)
- \li QInstaller.Running (deprecated: QInstaller.InstallerFailed)
- \li QInstaller.Canceled (deprecated: QInstaller.CanceledByUser)
- \li deprecated: QInstaller.InstallerUnfinished
- \endlist
+ \qmlproperty array installer::components
*/
/*!
- \qmlsignal QInstaller::aboutCalculateComponentsToInstall()
+ \qmlsignal installer::aboutCalculateComponentsToInstall()
Emitted before the ordered list of components to install is calculated.
*/
/*!
- \qmlsignal QInstaller::finishedCalculateComponentsToInstall()
+ \qmlsignal installer::finishedCalculateComponentsToInstall()
Emitted after the ordered list of components to install was calculated.
*/
/*!
- \qmlsignal QInstaller::aboutCalculateComponentsToUninstall()
+ \qmlsignal installer::aboutCalculateComponentsToUninstall()
Emitted before the ordered list of components to uninstall is calculated.
*/
/*!
- \qmlsignal QInstaller::finishedCalculateComponentsToUninstall()
+ \qmlsignal installer::finishedCalculateComponentsToUninstall()
Emitted after the ordered list of components to uninstall was calculated.
*/
/*!
- \qmlsignal QInstaller::componentAdded(Component component)
+ \qmlsignal installer::componentAdded(Component component)
Emitted when a new root component has been added.
@@ -154,7 +124,7 @@
*/
/*!
- \qmlsignal QInstaller::rootComponentsAdded(list<Component> components)
+ \qmlsignal installer::rootComponentsAdded(list<Component> components)
Emitted when a new list of root components has been added.
@@ -162,20 +132,20 @@
*/
/*!
- \qmlsignal QInstaller::updaterComponentsAdded(list<Component> components)
+ \qmlsignal installer::updaterComponentsAdded(list<Component> components)
Emitted when a new list of updater components has been added.
\sa componentAdded, rootComponentsAdded
*/
/*!
- \qmlsignal QInstaller::componentsAboutToBeCleared()
+ \qmlsignal installer::componentsAboutToBeCleared()
Deprecated, and not emitted any more.
*/
/*!
- \qmlsignal QInstaller::valueChanged(string key, string value)
+ \qmlsignal installer::valueChanged(string key, string value)
Emitted whenever a value changes.
@@ -183,38 +153,38 @@
*/
/*!
- \qmlsignal QInstaller::statusChanged(Status status)
+ \qmlsignal installer::statusChanged(Status status)
Emitted whenever the installer status changes.
*/
/*!
- \qmlsignal QInstaller::currentPageChanged(int page)
+ \qmlsignal installer::currentPageChanged(int page)
Emitted whenever the current page changes.
*/
/*!
- \qmlsignal QInstaller::finishButtonClicked()
+ \qmlsignal installer::finishButtonClicked()
Emitted when the user clicks the \uicontrol Finish button of the installer.
*/
/*!
- \qmlsignal QInstaller::metaJobProgress(int progress)
+ \qmlsignal installer::metaJobProgress(int progress)
Triggered with progress updates of the while communicating with a remote repository. Progress
ranges from 0 to 100.
*/
/*!
- \qmlsignal QInstaller::metaJobInfoMessage(string message)
+ \qmlsignal installer::metaJobInfoMessage(string message)
Triggered with informative updates of the communication with a remote repository.
*/
/*!
- \qmlsignal QInstaller::startAllComponentsReset()
+ \qmlsignal installer::startAllComponentsReset()
Triggered when the list of components starts to get updated.
@@ -222,7 +192,7 @@
*/
/*!
- \qmlsignal QInstaller::finishAllComponentsReset(list<Component> rootComponents)
+ \qmlsignal installer::finishAllComponentsReset(list<Component> rootComponents)
Triggered when the list of new root components has been updated.
@@ -230,19 +200,19 @@
*/
/*!
- \qmlsignal QInstaller::startUpdaterComponentsReset()
+ \qmlsignal installer::startUpdaterComponentsReset()
Triggered when components start to get updated during a remote update.
*/
/*!
- \qmlsignal QInstaller::finishUpdaterComponentsReset(list<Component> componentsWithUpdates)
+ \qmlsignal installer::finishUpdaterComponentsReset(list<Component> componentsWithUpdates)
Triggered when the list of available remote updates has been updated.
*/
/*!
- \qmlsignal QInstaller::installationStarted()
+ \qmlsignal installer::installationStarted()
Triggered when installation has started.
@@ -250,7 +220,7 @@
*/
/*!
- \qmlsignal QInstaller::installationInterrupted()
+ \qmlsignal installer::installationInterrupted()
Triggered when installation has been interrupted (cancelled).
@@ -258,7 +228,7 @@
*/
/*!
- \qmlsignal QInstaller::installationFinished()
+ \qmlsignal installer::installationFinished()
Triggered when installation has been finished.
@@ -266,13 +236,13 @@
*/
/*!
- \qmlsignal QInstaller::updateFinished()
+ \qmlsignal installer::updateFinished()
Triggered when an update has been finished.
*/
/*!
- \qmlsignal QInstaller::uninstallationStarted()
+ \qmlsignal installer::uninstallationStarted()
Triggered when uninstallation has started.
@@ -280,7 +250,7 @@
*/
/*!
- \qmlsignal QInstaller::uninstallationFinished()
+ \qmlsignal installer::uninstallationFinished()
Triggered when uninstallation has been finished.
@@ -288,38 +258,38 @@
*/
/*!
- \qmlsignal QInstaller::titleMessageChanged(string title)
+ \qmlsignal installer::titleMessageChanged(string title)
Emitted when the text of the installer status (on the PerformInstallation page) changes to
\a title.
*/
/*!
- \qmlsignal QInstaller::wizardPageInsertionRequested(Widget widget, WizardPage page)
+ \qmlsignal installer::wizardPageInsertionRequested(Widget widget, WizardPage page)
Emitted when a custom \a widget is about to be inserted into \a page by addWizardPage.
*/
/*!
- \qmlsignal QInstaller::wizardPageRemovalRequested(Widget widget)
+ \qmlsignal installer::wizardPageRemovalRequested(Widget widget)
Emitted when a \a widget is removed by removeWizardPage.
*/
/*!
- \qmlsignal QInstaller::wizardWidgetInsertionRequested(Widget widget, WizardPage page)
+ \qmlsignal installer::wizardWidgetInsertionRequested(Widget widget, WizardPage page)
Emitted when a \a widget is inserted into \a page by addWizardPageItem.
*/
/*!
- \qmlsignal QInstaller::wizardWidgetRemovalRequested(Widget widget)
+ \qmlsignal installer::wizardWidgetRemovalRequested(Widget widget)
Emitted when a \a widget is removed by removeWizardPageItem.
*/
/*!
- \qmlsignal QInstaller::wizardPageVisibilityChangeRequested(bool visible, int page)
+ \qmlsignal installer::wizardPageVisibilityChangeRequested(bool visible, int page)
Emitted when the visibility of the page with id \a page changes to \a visible.
@@ -327,14 +297,14 @@
*/
/*!
- \qmlsignal QInstaller::setValidatorForCustomPageRequested(Componentcomponent, string name,
+ \qmlsignal installer::setValidatorForCustomPageRequested(Component component, string name,
string callbackName)
Triggered when setValidatorForCustomPage is called.
*/
/*!
- \qmlsignal QInstaller::setAutomatedPageSwitchEnabled(bool request)
+ \qmlsignal installer::setAutomatedPageSwitchEnabled(bool request)
Triggered when the automatic switching from PerformInstallation to InstallationFinished page
is enabled (\a request = \c true) or disabled (\a request = \c false).
@@ -344,19 +314,21 @@
*/
/*!
- \qmlsignal QInstaller::coreNetworkSettingsChanged()
+ \qmlsignal installer::coreNetworkSettingsChanged()
Emitted when the network settings are changed.
*/
-/*!
- \qmlmethod list<Component> QInstaller::components()
-
- Returns the list of all components.
-*/
using namespace QInstaller;
+/*!
+ \class QInstaller::PackageManagerCore
+ \inmodule QtInstallerFramework
+ \brief The PackageManagerCore class provides the core functionality of the Qt Installer
+ Framework.
+*/
+
Q_GLOBAL_STATIC(QMutex, globalModelMutex);
static QFont *sVirtualComponentsFont = 0;
Q_GLOBAL_STATIC(QMutex, globalVirtualComponentsFontMutex);
@@ -432,7 +404,7 @@ QObject *PackageManagerCore::guiObject() const
}
/*!
- \qmlmethod void QInstaller::setCompleteUninstallation(bool complete)
+ \qmlmethod void installer::setCompleteUninstallation(bool complete)
Sets the uninstallation to be \a complete. If \a complete is false, only components deselected
by the user will be uninstalled. This option applies only on uninstallation.
@@ -443,7 +415,7 @@ void PackageManagerCore::setCompleteUninstallation(bool complete)
}
/*!
- \qmlmethod void QInstaller::cancelMetaInfoJob()
+ \qmlmethod void installer::cancelMetaInfoJob()
Cancels the retrieval of meta information from a remote repository.
*/
@@ -453,7 +425,7 @@ void PackageManagerCore::cancelMetaInfoJob()
}
/*!
- \qmlmethod void QInstaller::componentsToInstallNeedsRecalculation()
+ \qmlmethod void installer::componentsToInstallNeedsRecalculation()
Ensures that component dependencies are re-calculated.
*/
@@ -463,7 +435,7 @@ void PackageManagerCore::componentsToInstallNeedsRecalculation()
}
/*!
- \qmlmethod void QInstaller::autoAcceptMessageBoxes()
+ \qmlmethod void installer::autoAcceptMessageBoxes()
Automatically accept all user message boxes.
@@ -475,7 +447,7 @@ void PackageManagerCore::autoAcceptMessageBoxes()
}
/*!
- \qmlmethod void QInstaller::autoRejectMessageBoxes()
+ \qmlmethod void installer::autoRejectMessageBoxes()
Automatically reject all user message boxes.
@@ -487,7 +459,7 @@ void PackageManagerCore::autoRejectMessageBoxes()
}
/*!
- \qmlmethod void QInstaller::setMessageBoxAutomaticAnswer(string identifier, int button)
+ \qmlmethod void installer::setMessageBoxAutomaticAnswer(string identifier, int button)
Automatically close the message box with ID \a identifier as if the user had pressed \a button.
@@ -509,7 +481,7 @@ quint64 size(QInstaller::Component *component, const QString &value)
}
/*!
- \qmlmethod float QInstaller::requiredDiskSpace()
+ \qmlmethod float installer::requiredDiskSpace()
Returns the estimated amount of disk space in bytes required after installation.
@@ -526,7 +498,7 @@ quint64 PackageManagerCore::requiredDiskSpace() const
}
/*!
- \qmlmethod float QInstaller::requiredTemporaryDiskSpace()
+ \qmlmethod float installer::requiredTemporaryDiskSpace()
Returns the estimated required disk space during installation in bytes.
@@ -693,7 +665,7 @@ bool PackageManagerCore::isFileExtensionRegistered(const QString &extension) con
}
/*!
- \qmlmethod boolean QInstaller::fileExists(string filePath)
+ \qmlmethod boolean installer::fileExists(string filePath)
Returns \c true if the \a filePath exists; otherwise returns \c false.
@@ -953,7 +925,7 @@ bool PackageManagerCore::fetchRemotePackagesTree()
}
/*!
- \qmlmethod boolean QInstaller::addWizardPage(Component component, string name, int page)
+ \qmlmethod boolean installer::addWizardPage(Component component, string name, int page)
Adds the widget with objectName() \a name registered by \a component as a new page
into the installer's GUI wizard. The widget is added before \a page.
@@ -974,7 +946,7 @@ bool PackageManagerCore::addWizardPage(Component *component, const QString &name
}
/*!
- \qmlmethod boolean QInstaller::removeWizardPage(Component component, string name)
+ \qmlmethod boolean installer::removeWizardPage(Component component, string name)
Removes the widget with objectName() \a name previously added to the installer's wizard
by \a component.
@@ -993,7 +965,7 @@ bool PackageManagerCore::removeWizardPage(Component *component, const QString &n
}
/*!
- \qmlmethod boolean QInstaller::setDefaultPageVisible(int page, boolean visible)
+ \qmlmethod boolean installer::setDefaultPageVisible(int page, boolean visible)
Sets the visibility of the default page with id \a page to \a visible, i.e.
removes or adds it from/to the wizard. This works only for pages which have been
@@ -1010,7 +982,7 @@ bool PackageManagerCore::setDefaultPageVisible(int page, bool visible)
}
/*!
- \qmlmethod void QInstaller::setValidatorForCustomPage(Component component, string name,
+ \qmlmethod void installer::setValidatorForCustomPage(Component component, string name,
string callbackName)
\sa setValidatorForCustomPageRequested
@@ -1022,7 +994,7 @@ void PackageManagerCore::setValidatorForCustomPage(Component *component, const Q
}
/*!
- \qmlmethod boolean QInstaller::addWizardPageItem(Component component, string name, int page)
+ \qmlmethod boolean installer::addWizardPageItem(Component component, string name, int page)
Adds the widget with objectName() \a name registered by \a component as an GUI element
into the installer's GUI wizard. The widget is added on \a page.
@@ -1041,7 +1013,7 @@ bool PackageManagerCore::addWizardPageItem(Component *component, const QString &
}
/*!
- \qmlmethod boolean QInstaller::removeWizardPageItem(Component component, string name)
+ \qmlmethod boolean installer::removeWizardPageItem(Component component, string name)
Removes the widget with objectName() \a name previously added to the installer's wizard
by \a component.
@@ -1058,7 +1030,7 @@ bool PackageManagerCore::removeWizardPageItem(Component *component, const QStrin
}
/*!
- \qmlmethod void QInstaller::addUserRepositories(stringlist repositories)
+ \qmlmethod void installer::addUserRepositories(stringlist repositories)
Registers additional \a repositories.
@@ -1074,7 +1046,7 @@ void PackageManagerCore::addUserRepositories(const QStringList &repositories)
}
/*!
- \qmlmethod void QInstaller::setTemporaryRepositories(stringlist repositories, boolean replace)
+ \qmlmethod void installer::setTemporaryRepositories(stringlist repositories, boolean replace)
Sets additional \a repositories for this instance of the installer or updater.
Will be removed after invoking it again.
@@ -1128,7 +1100,7 @@ void PackageManagerCore::appendRootComponent(Component *component)
}
/*!
- \enum ComponentType
+ \enum PackageManagerCore::ComponentType
This enum is used with components() to describe what type of \C Component list this function
should return.
@@ -1194,7 +1166,7 @@ void PackageManagerCore::appendUpdaterComponent(Component *component)
}
/*!
- \qmlmethod Component QInstaller::componentByName(string name)
+ \qmlmethod component installer::componentByName(string name)
Returns a component matching \a name. \a name can also contain a version requirement.
For example "org.qt-project.sdk.qt" returns any component with that name,
@@ -1228,7 +1200,7 @@ Component *PackageManagerCore::componentByName(const QString &name, const QList<
}
/*!
- \qmlmethod boolean QInstaller::calculateComponentsToInstall()
+ \qmlmethod boolean installer::calculateComponentsToInstall()
Calculates an ordered list of components to install based on the current run mode. Also auto
installed dependencies are resolved. The aboutCalculateComponentsToInstall() signal is emitted
@@ -1276,7 +1248,7 @@ QList<Component*> PackageManagerCore::orderedComponentsToInstall() const
}
/*!
- \qmlmethod boolean QInstaller::calculateComponentsToUninstall()
+ \qmlmethod boolean installer::calculateComponentsToUninstall()
Calculates a list of components to uninstall based on the current run mode. Auto installed
dependencies are not yet resolved. The aboutCalculateComponentsToUninstall() signal is emitted
@@ -1386,7 +1358,7 @@ Settings &PackageManagerCore::settings() const
}
/*!
- \qmlmethod boolean QInstaller::gainAdminRights()
+ \qmlmethod boolean installer::gainAdminRights()
Tries to gain admin rights. On success, it returns \c true.
@@ -1404,7 +1376,7 @@ bool PackageManagerCore::gainAdminRights()
}
/*!
- \qmlmethod void QInstaller::dropAdminRights()
+ \qmlmethod void installer::dropAdminRights()
Drops admin rights gained by gainAdminRights.
@@ -1416,7 +1388,7 @@ void PackageManagerCore::dropAdminRights()
}
/*!
- \qmlmethod boolean QInstaller::isProcessRunning(string name)
+ \qmlmethod boolean installer::isProcessRunning(string name)
Returns true, if a process with \a name is running. On Windows, the comparison
is case-insensitive.
@@ -1427,7 +1399,7 @@ bool PackageManagerCore::isProcessRunning(const QString &name) const
}
/*!
- \qmlmethod boolean QInstaller::killProcess(string absoluteFilePath)
+ \qmlmethod boolean installer::killProcess(string absoluteFilePath)
Returns true, if a process with \a absoluteFilePath could be killed or isn't running
@@ -1466,7 +1438,7 @@ bool PackageManagerCore::killProcess(const QString &absoluteFilePath) const
/*!
- \qmlmethod void QInstaller::setDependsOnLocalInstallerBinary()
+ \qmlmethod void installer::setDependsOnLocalInstallerBinary()
Makes sure the installer runs from a local drive. Otherwise the user will get an
appropriate error message.
@@ -1482,7 +1454,7 @@ void PackageManagerCore::setDependsOnLocalInstallerBinary()
}
/*!
- \qmlmethod boolean QInstaller::localInstallerBinaryUsed()
+ \qmlmethod boolean installer::localInstallerBinaryUsed()
Returns \c false if the installer is run on Windows, and the installer has been started from
a remote file system drive. Otherwise returns \c true.
@@ -1498,7 +1470,7 @@ bool PackageManagerCore::localInstallerBinaryUsed()
}
/*!
- \qmlmethod array QInstaller::execute(string program, stringlist arguments = undefined,
+ \qmlmethod array installer::execute(string program, stringlist arguments = undefined,
string stdin = "")
Starts the program \a program with the arguments \a arguments in a
@@ -1541,7 +1513,7 @@ QList<QVariant> PackageManagerCore::execute(const QString &program, const QStrin
}
/*!
- \qmlmethod boolean QInstaller::executeDetached(string program, stringlist arguments = undefined,
+ \qmlmethod boolean installer::executeDetached(string program, stringlist arguments = undefined,
string workingDirectory = "")
Starts the program \a program with the arguments \a arguments in a
@@ -1578,7 +1550,7 @@ bool PackageManagerCore::executeDetached(const QString &program, const QStringLi
/*!
- \qmlmethod string QInstaller::environmentVariable(string name)
+ \qmlmethod string installer::environmentVariable(string name)
Returns content of an environment variable \a name. An empty string is returned if the
environment variable is not set.
@@ -1621,7 +1593,7 @@ bool PackageManagerCore::operationExists(const QString &name)
}
/*!
- \qmlmethod boolean QInstaller::performOperation(string name, stringlist arguments)
+ \qmlmethod boolean installer::performOperation(string name, stringlist arguments)
Instantly performs an operation \a name with \a arguments.
*/
@@ -1641,7 +1613,7 @@ bool PackageManagerCore::performOperation(const QString &name, const QStringList
}
/*!
- \qmlmethod boolean QInstaller::versionMatches(string version, string requirement)
+ \qmlmethod boolean installer::versionMatches(string version, string requirement)
Returns \c true when \a version matches the \a requirement.
\a requirement can be a fixed version number or it can be prefix by the comparators '>', '>=',
@@ -1670,7 +1642,7 @@ bool PackageManagerCore::versionMatches(const QString &version, const QString &r
}
/*!
- \qmlmethod string QInstaller::findLibrary(string name, stringlist paths = [])
+ \qmlmethod string installer::findLibrary(string name, stringlist paths = [])
Finds a library named \a name in \a paths.
If \a paths is empty, it gets filled with platform dependent default paths.
@@ -1712,7 +1684,7 @@ QString PackageManagerCore::findLibrary(const QString &name, const QStringList &
}
/*!
- \qmlmethod string QInstaller::findPath(string name, stringlist paths = [])
+ \qmlmethod string installer::findPath(string name, stringlist paths = [])
Tries to find a file name \a name in one of \a paths.
The resulting path is returned.
@@ -1735,7 +1707,7 @@ QString PackageManagerCore::findPath(const QString &name, const QStringList &pat
}
/*!
- \qmlmethod void QInstaller::setInstallerBaseBinary(string path)
+ \qmlmethod void installer::setInstallerBaseBinary(string path)
Sets the "installerbase" binary to use when writing the maintenance tool.
Set this if an update to installerbase is available.
@@ -1748,7 +1720,7 @@ void PackageManagerCore::setInstallerBaseBinary(const QString &path)
}
/*!
- \qmlmethod string QInstaller::value(string key, string defaultValue = "")
+ \qmlmethod string installer::value(string key, string defaultValue = "")
Returns the installer value for \a key. If \a key is not known to the system, \a defaultValue is
returned. Additionally, on Windows, \a key can be a registry key.
@@ -1761,7 +1733,7 @@ QString PackageManagerCore::value(const QString &key, const QString &defaultValu
}
/*!
- \qmlmethod void QInstaller::setValue(string key, string value)
+ \qmlmethod void installer::setValue(string key, string value)
Sets the installer value for \a key to \a value.
@@ -1775,7 +1747,7 @@ void PackageManagerCore::setValue(const QString &key, const QString &value)
}
/*!
- \qmlmethod boolean QInstaller::containsValue(string key)
+ \qmlmethod boolean installer::containsValue(string key)
Returns \c true if the installer contains a value for \a key.
@@ -1787,7 +1759,7 @@ bool PackageManagerCore::containsValue(const QString &key) const
}
/*!
- \qmlmethod void QInstaller::setSharedFlag(string key, boolean value)
+ \qmlmethod void installer::setSharedFlag(string key, boolean value)
Sets a shared flag with name \a key to \a value. This is one option
to share information between scripts.
@@ -1800,7 +1772,7 @@ void PackageManagerCore::setSharedFlag(const QString &key, bool value)
}
/*!
- \qmlmethod boolean QInstaller::sharedFlag(string key)
+ \qmlmethod boolean installer::sharedFlag(string key)
Returns shared flag with name \a key. This is one option
to share information between scripts.
@@ -1842,7 +1814,7 @@ bool PackageManagerCore::finishedWithSuccess() const
}
/*!
- \qmlmethod void QInstaller::interrupt()
+ \qmlmethod void installer::interrupt()
Cancels an ongoing installation.
@@ -1855,7 +1827,7 @@ void PackageManagerCore::interrupt()
}
/*!
- \qmlmethod void QInstaller::setCanceled()
+ \qmlmethod void installer::setCanceled()
Cancels the installation.
*/
@@ -1905,7 +1877,7 @@ QString PackageManagerCore::installerBinaryPath() const
}
/*!
- \qmlmethod boolean QInstaller::isInstaller()
+ \qmlmethod boolean installer::isInstaller()
Returns \c true if executed in an install step.
@@ -1917,7 +1889,7 @@ bool PackageManagerCore::isInstaller() const
}
/*!
- \qmlmethod boolean QInstaller::isOfflineOnly()
+ \qmlmethod boolean installer::isOfflineOnly()
Returns \c true if this is an offline-only installer.
*/
@@ -1927,7 +1899,7 @@ bool PackageManagerCore::isOfflineOnly() const
}
/*!
- \qmlmethod void QInstaller::setUninstaller()
+ \qmlmethod void installer::setUninstaller()
Forces an uninstaller context.
@@ -1939,7 +1911,7 @@ void PackageManagerCore::setUninstaller()
}
/*!
- \qmlmethod boolean QInstaller::isUninstaller()
+ \qmlmethod boolean installer::isUninstaller()
Returns \c true if the script is executed in an uninstall context.
@@ -1951,7 +1923,7 @@ bool PackageManagerCore::isUninstaller() const
}
/*!
- \qmlmethod void QInstaller::setUpdater()
+ \qmlmethod void installer::setUpdater()
Forces an updater context.
@@ -1963,7 +1935,7 @@ void PackageManagerCore::setUpdater()
}
/*!
- \qmlmethod boolean QInstaller::isUpdater()
+ \qmlmethod boolean installer::isUpdater()
Returns \c true if the script is executed in an updater context.
@@ -1975,7 +1947,7 @@ bool PackageManagerCore::isUpdater() const
}
/*!
- \qmlmethod void QInstaller::setPackageManager()
+ \qmlmethod void installer::setPackageManager()
Forces a package manager context.
*/
@@ -1986,7 +1958,7 @@ void PackageManagerCore::setPackageManager()
/*!
- \qmlmethod boolean QInstaller::isPackageManager()
+ \qmlmethod boolean installer::isPackageManager()
Returns \c true if the script is executed in a package manager context.
\sa setPackageManager, isInstaller, isUninstaller, isUpdater
@@ -1997,7 +1969,7 @@ bool PackageManagerCore::isPackageManager() const
}
/*!
- \qmlmethod boolean QInstaller::runInstaller()
+ \qmlmethod boolean installer::runInstaller()
Runs the installer. Returns \c true on success, \c false otherwise.
*/
@@ -2007,7 +1979,7 @@ bool PackageManagerCore::runInstaller()
}
/*!
- \qmlmethod boolean QInstaller::runUninstaller()
+ \qmlmethod boolean installer::runUninstaller()
Runs the uninstaller. Returns \c true on success, \c false otherwise.
*/
@@ -2017,7 +1989,7 @@ bool PackageManagerCore::runUninstaller()
}
/*!
- \qmlmethod boolean QInstaller::runPackageUpdater()
+ \qmlmethod boolean installer::runPackageUpdater()
Runs the package updater. Returns \c true on success, \c false otherwise.
*/
@@ -2027,7 +1999,7 @@ bool PackageManagerCore::runPackageUpdater()
}
/*!
- \qmlmethod void QInstaller::languageChanged()
+ \qmlmethod void installer::languageChanged()
Calls languangeChanged on all components.
*/
diff --git a/src/libs/installer/packagemanagergui.cpp b/src/libs/installer/packagemanagergui.cpp
index 56483a1c5..b30abca8f 100644
--- a/src/libs/installer/packagemanagergui.cpp
+++ b/src/libs/installer/packagemanagergui.cpp
@@ -232,7 +232,9 @@ public:
/*!
\class QInstaller::PackageManagerGui
- Is the "gui" object in a none interactive installation
+ \inmodule QtInstallerFramework
+ \brief The PackageManagerGui class provides the core functionality for non-interactive
+ installations.
*/
PackageManagerGui::PackageManagerGui(PackageManagerCore *core, QWidget *parent)
: QWizard(parent)
@@ -805,10 +807,11 @@ QWidget *PackageManagerPage::findWidget(const QString &objectName) const
}
/*!
- \reimp
- \Overwritten to support some kind of initializePage() in the case the wizard has been set
+ \internal
+
+ Used to support some kind of initializePage() in the case the wizard has been set
to QWizard::IndependentPages. If that option has been set, initializePage() would be only
- called once. So we provide entering() and leaving() based on this overwritten function.
+ called once. So we provide entering() and leaving() based on this reimplemented function.
*/
void PackageManagerPage::setVisible(bool visible)
{
@@ -1555,7 +1558,8 @@ public:
/*!
\class QInstaller::ComponentSelectionPage
- On this page the user can select and deselect what he wants to be installed.
+ \inmodule QtInstallerFramework
+ \brief The ComponentSelectionPage class can be used to change the checked state of components.
*/
ComponentSelectionPage::ComponentSelectionPage(PackageManagerCore *core)
: PackageManagerPage(core)
@@ -2167,7 +2171,8 @@ void ReadyForInstallationPage::leaving()
/*!
\class QInstaller::PerformInstallationPage
- On this page the user can see on a progress bar how far the current installation is.
+ \inmodule QtInstallerFramework
+ \brief The PerformInstallationPage class shows progress information about the installation state.
*/
PerformInstallationPage::PerformInstallationPage(PackageManagerCore *core)
: PackageManagerPage(core)
diff --git a/src/libs/installer/scriptengine.cpp b/src/libs/installer/scriptengine.cpp
index 2c66f389c..e51bbb3c2 100644
--- a/src/libs/installer/scriptengine.cpp
+++ b/src/libs/installer/scriptengine.cpp
@@ -52,8 +52,206 @@
namespace QInstaller {
/*!
+ \qmltype console
+ \inqmlmodule scripting
+ \brief The console type provides methods for logging and debugging.
+*/
+
+/*!
+ \qmlmethod void console::log(string value)
+*/
+
+/*!
+ \qmltype QFileDialog
+ \inqmlmodule scripting
+*/
+
+/*!
+ \qmlmethod string QFileDialog::getExistingDirectory(string caption, string dir)
+*/
+
+/*!
+ \qmlmethod string QFileDialog::getOpenFileName(string caption, string dir, string filter)
+*/
+
+/*!
+ \qmltype print
+ \inqmlmodule scripting
+*/
+
+/*!
+ \qmltype buttons
+ \inqmlmodule scripting
+*/
+
+/*!
+ \qmlproperty enumeration buttons::QWizard
+
+ \list
+ \li buttons.BackButton
+ \li buttons.NextButton
+ \li buttons.CommitButton
+ \li buttons.FinishButton
+ \li buttons.CancelButton
+ \li buttons.HelpButton
+ \li buttons.CustomButton1
+ \li buttons.CustomButton2
+ \li buttons.CustomButton3
+ \endlist
+*/
+
+/*!
+ \qmltype QDesktopServices
+ \inqmlmodule scripting
+*/
+
+/*!
+ \qmlproperty enumeration QDesktopServices::QStandardPaths
+
+ \list
+ \li DesktopServices.DesktopLocation
+ \li DesktopServices.DocumentsLocation
+ \li DesktopServices.FontsLocation
+ \li DesktopServices.ApplicationsLocation
+ \li DesktopServices.MusicLocation
+ \li DesktopServices.MoviesLocation
+ \li DesktopServices.PicturesLocation
+ \li DesktopServices.TempLocation
+ \li DesktopServices.HomeLocation
+ \li DesktopServices.DataLocation
+ \li DesktopServices.CacheLocation
+ \li DesktopServices.GenericDataLocation
+ \li DesktopServices.RuntimeLocation
+ \li DesktopServices.ConfigLocation
+ \li DesktopServices.DownloadLocation
+ \li DesktopServices.GenericCacheLocation
+ \li DesktopServices.GenericConfigLocation
+ \endlist
+*/
+
+/*!
+ \qmlmethod boolean QDesktopServices::openUrl(string url)
+*/
+
+/*!
+ \qmlmethod string QDesktopServices::displayName(int location)
+*/
+
+/*!
+ \qmlmethod string QDesktopServices::storageLocation(int location)
+*/
+
+/*!
+ \qmltype QInstaller
+ \inqmlmodule scripting
+
+ \brief The QInstaller type provides access to the installer status and pages from Qt Script.
+*/
+
+/*!
+ \qmlproperty enumeration QInstaller::WizardPage
+
+ The installer has various pre-defined pages that can be used to for example insert pages
+ in a certain place:
+ \list
+ \li QInstaller.Introduction
+ \li QInstaller.TargetDirectory
+ \li QInstaller.ComponentSelection
+ \li QInstaller.LicenseCheck
+ \li QInstaller.StartMenuSelection
+ \li QInstaller.ReadyForInstallation
+ \li QInstaller.PerformInstallation
+ \li QInstaller.InstallationFinished
+ \li QInstaller.End
+ \endlist
+*/
+
+
+/*!
+ \qmlproperty enumeration QInstaller::status
+
+ Status of the installer.
+
+ Possible values are:
+ \list
+ \li QInstaller.Success (deprecated: QInstaller.InstallerSucceeded)
+ \li QInstaller.Failure (deprecated: QInstaller.InstallerFailed)
+ \li QInstaller.Running (deprecated: QInstaller.InstallerFailed)
+ \li QInstaller.Canceled (deprecated: QInstaller.CanceledByUser)
+ \li QInstaller.Unfinished (deprecated: QInstaller.InstallerUnfinished)
+ \li QInstaller.ForceUpdate
+ \endlist
+*/
+
+/*!
+ \qmltype gui
+ \inqmlmodule scripting
+*/
+
+/*!
+ \qmlmethod object gui::pageById(int id)
+*/
+
+/*!
+ \qmlmethod object gui::pageByObjectName(string name)
+*/
+
+/*!
+ \qmlmethod object gui::currentPageWidget()
+*/
+
+/*!
+ \qmlmethod object gui::pageWidgetByObjectName(string name)
+*/
+
+/*!
+ \qmlmethod string gui::defaultButtonText(int wizardButton)
+*/
+
+/*!
+ \qmlmethod void gui::clickButton(int wizardButton, int delayInMs)
+*/
+
+/*!
+ \qmlmethod boolean gui::isButtonEnabled(int wizardButton)
+*/
+
+/*!
+ \qmlmethod void gui::showSettingsButton(boolean show)
+*/
+
+/*!
+ \qmlmethod void gui::setSettingsButtonEnabled(boolean enable)
+*/
+
+/*!
+ \qmlsignal gui::interrupted()
+*/
+
+/*!
+ \qmlsignal gui::languageChanged()
+*/
+
+/*!
+ \qmlsignal gui::finishButtonClicked()
+*/
+
+/*!
+ \qmlsignal gui::gotRestarted()
+*/
+
+/*!
+ \qmlsignal gui::settingsButtonClicked();
+*/
+
+/*!
\class QInstaller::ScriptEngine
- prepare and run the component scripts
+ \inmodule QtInstallerFramework
+ \brief The ScriptEngine class is used to prepare and run the component scripts.
+*/
+
+/*!
+ Constructs a script engine with \a core as parent.
*/
ScriptEngine::ScriptEngine(PackageManagerCore *core)
: QObject(core)
@@ -126,7 +324,7 @@ void ScriptEngine::addQObjectChildren(QObject *root)
The installer and all its components as well as other useful stuff are being exported into the
script. Read \link componentscripting Component Scripting \endlink for details.
- \throws Error when either the script at \a fileName couldn't be opened, or the QScriptEngine
+ Throws Error when either the script at \a fileName could not be opened, or the QScriptEngine
couldn't evaluate the script.
*/
QJSValue ScriptEngine::loadInContext(const QString &context, const QString &fileName,
@@ -230,6 +428,7 @@ QJSValue ScriptEngine::generateWizardButtonsObject()
}
/*!
+ \internal
generates QMessageBox::StandardButton enum as an QScriptValue array
*/
QJSValue ScriptEngine::generateMessageBoxObject()
diff --git a/src/libs/kdtools/kdupdaterapplication.cpp b/src/libs/kdtools/kdupdaterapplication.cpp
index 76290348c..ebc5caebb 100644
--- a/src/libs/kdtools/kdupdaterapplication.cpp
+++ b/src/libs/kdtools/kdupdaterapplication.cpp
@@ -75,7 +75,7 @@ medium-to-large scale software systems.
/*!
\class KDUpdater::Application kdupdaterapplication.h KDUpdaterApplication
- \ingroup kdupdater
+ \inmodule kdupdater
\brief This class represents an application that can be updated.
A KDUpdater application is an application that needs to interact with one or more update servers and
diff --git a/src/libs/kdtools/kdupdaterfiledownloader.cpp b/src/libs/kdtools/kdupdaterfiledownloader.cpp
index 96baf88b3..b535f22a6 100644
--- a/src/libs/kdtools/kdupdaterfiledownloader.cpp
+++ b/src/libs/kdtools/kdupdaterfiledownloader.cpp
@@ -71,11 +71,11 @@ static double calcProgress(qint64 done, qint64 total)
// -- KDUpdater::FileDownloader
/*!
- \internal
- \ingroup kdupdater
+ \inmodule kdupdater
\class KDUpdater::FileDownloader kdupdaterfiledownloader.h
+ \brief The FileDownloader class is the base class for file downloaders used in KDUpdater.
- Base class for file downloaders used in KDUpdater. File downloaders are used by
+ File downloaders are used by
the KDUpdater::Update class to download update files. Each subclass of FileDownloader
can download file from a specific category of sources (e.g. local, ftp, http etc).
diff --git a/src/libs/kdtools/kdupdaterfiledownloaderfactory.cpp b/src/libs/kdtools/kdupdaterfiledownloaderfactory.cpp
index cd6b552a5..5af9b00af 100644
--- a/src/libs/kdtools/kdupdaterfiledownloaderfactory.cpp
+++ b/src/libs/kdtools/kdupdaterfiledownloaderfactory.cpp
@@ -44,9 +44,10 @@
#include <QtNetwork/QSslSocket>
+using namespace KDUpdater;
+
/*!
- \internal
- \ingroup kdupdater
+ \inmodule kdupdater
\class KDUpdater::FileDownloaderFactory kdupdaterfiledownloaderfactory.h
\brief Factory for \ref KDUpdater::FileDownloader
@@ -57,7 +58,6 @@
be created and its reference can be fetched from the \ref instance() method.
*/
-using namespace KDUpdater;
FileDownloaderFactory& FileDownloaderFactory::instance()
{
diff --git a/src/libs/kdtools/kdupdaterpackagesinfo.cpp b/src/libs/kdtools/kdupdaterpackagesinfo.cpp
index 1e882e173..929618df2 100644
--- a/src/libs/kdtools/kdupdaterpackagesinfo.cpp
+++ b/src/libs/kdtools/kdupdaterpackagesinfo.cpp
@@ -50,7 +50,7 @@
using namespace KDUpdater;
/*!
- \ingroup kdupdater
+ \inmodule kdupdater
\class KDUpdater::PackagesInfo kdupdaterpackagesinfo.h KDUpdaterPackagesInfo
\brief Provides access to information about packages installed on the application side.
@@ -528,7 +528,7 @@ void PackagesInfo::clearPackageInfoList()
*/
/*!
- \ingroup kdupdater
+ \inmodule kdupdater
\struct KDUpdater::PackageInfo kdupdaterpackagesinfo.h KDUpdaterPackageInfo
\brief Describes a single installed package in the application.
diff --git a/src/libs/kdtools/kdupdatertask.cpp b/src/libs/kdtools/kdupdatertask.cpp
index 187bcdae7..469d1b2e0 100644
--- a/src/libs/kdtools/kdupdatertask.cpp
+++ b/src/libs/kdtools/kdupdatertask.cpp
@@ -44,7 +44,7 @@
using namespace KDUpdater;
/*!
- \ingroup kdupdater
+ \inmodule kdupdater
\class KDUpdater::Task kdupdatertask.h KDUpdaterTask
\brief Base class for all task classes in KDUpdater
diff --git a/src/libs/kdtools/kdupdaterupdate.cpp b/src/libs/kdtools/kdupdaterupdate.cpp
index c6b0775e8..90f92dbd8 100644
--- a/src/libs/kdtools/kdupdaterupdate.cpp
+++ b/src/libs/kdtools/kdupdaterupdate.cpp
@@ -44,7 +44,7 @@
using namespace KDUpdater;
/*!
- \ingroup kdupdater
+ \inmodule kdupdater
\class KDUpdater::Update kdupdaterupdate.h KDUpdaterUpdate
\brief Represents a single update
diff --git a/src/libs/kdtools/kdupdaterupdatefinder.cpp b/src/libs/kdtools/kdupdaterupdatefinder.cpp
index e53c47280..e7a6835f2 100644
--- a/src/libs/kdtools/kdupdaterupdatefinder.cpp
+++ b/src/libs/kdtools/kdupdaterupdatefinder.cpp
@@ -55,7 +55,7 @@
using namespace KDUpdater;
/*!
- \ingroup kdupdater
+ \inmodule kdupdater
\class KDUpdater::UpdateFinder kdupdaterupdatefinder KDUpdaterUpdateFinder
\brief Finds updates applicable for a \ref KDUpdater::Application
@@ -531,7 +531,7 @@ void UpdateFinder::Private::slotDownloadDone()
/*!
- \ingroup kdupdater
+ \inmodule kdupdater
This function compares two version strings \c v1 and \c v2 and returns
-1, 0 or +1 based on the following rule
diff --git a/src/libs/kdtools/kdupdaterupdateoperation.cpp b/src/libs/kdtools/kdupdaterupdateoperation.cpp
index 9ba165d4b..037aa536d 100644
--- a/src/libs/kdtools/kdupdaterupdateoperation.cpp
+++ b/src/libs/kdtools/kdupdaterupdateoperation.cpp
@@ -48,8 +48,10 @@
#include <QFileInfo>
#include <QTemporaryFile>
+using namespace KDUpdater;
+
/*!
- \ingroup kdupdater
+ \inmodule kdupdater
\class KDUpdater::UpdateOperation kdupdaterupdateoperation.h KDUpdaterUpdateOperation
\brief Abstract base class for update operations.
@@ -76,8 +78,6 @@ static QString backupFileName(const QString &templateName)
return name;
}
-using namespace KDUpdater;
-
/*!
Constructor
*/
diff --git a/src/libs/kdtools/kdupdaterupdateoperationfactory.cpp b/src/libs/kdtools/kdupdaterupdateoperationfactory.cpp
index ed5c67a8b..9478d1751 100644
--- a/src/libs/kdtools/kdupdaterupdateoperationfactory.cpp
+++ b/src/libs/kdtools/kdupdaterupdateoperationfactory.cpp
@@ -44,8 +44,10 @@
#include <QHash>
+using namespace KDUpdater;
+
/*!
- \ingroup kdupdater
+ \inmodule kdupdater
\class KDUpdater::UpdateOperationFactory kdupdaterupdateoperationfactory.h KDUpdaterUpdateOperationFactory
\brief Factory for \ref KDUpdater::UpdateOperation
@@ -63,8 +65,6 @@
T is constructed using its default constructor.
*/
-using namespace KDUpdater;
-
/*!
Returns the UpdateOperationFactory instance. The instance is created if needed.
*/
diff --git a/src/libs/kdtools/kdupdaterupdatesourcesinfo.cpp b/src/libs/kdtools/kdupdaterupdatesourcesinfo.cpp
index 140577d3c..ea54adcec 100644
--- a/src/libs/kdtools/kdupdaterupdatesourcesinfo.cpp
+++ b/src/libs/kdtools/kdupdaterupdatesourcesinfo.cpp
@@ -49,9 +49,10 @@
#include <QFile>
#include <QTextStream>
+using namespace KDUpdater;
/*!
- \ingroup kdupdater
+ \inmodule kdupdater
\class KDUpdater::UpdateSourcesInfo kdupdaterupdatesourcesinfo.h KDUpdaterUpdateSourcesInfo
\brief Provides access to information about the update sources set for the application.
@@ -102,7 +103,6 @@
* Changes made to the object could be saved back to the source file
*/
-using namespace KDUpdater;
struct UpdateSourceInfoPriorityHigherThan
{
@@ -405,7 +405,7 @@ void UpdateSourcesInfo::UpdateSourcesInfoData::addChildElement(QDomDocument &doc
}
/*!
- \ingroup kdupdater
+ \inmodule kdupdater
\struct KDUpdater::UpdateSourceInfo kdupdaterupdatesourcesinfo.h KDUpdaterUpdateSourcesInfo
\brief Describes a single update source