summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/packagemanagercore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/installer/packagemanagercore.cpp')
-rw-r--r--src/libs/installer/packagemanagercore.cpp50
1 files changed, 48 insertions, 2 deletions
diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp
index d3d3b5be7..392dfb7b0 100644
--- a/src/libs/installer/packagemanagercore.cpp
+++ b/src/libs/installer/packagemanagercore.cpp
@@ -224,6 +224,15 @@ using namespace QInstaller;
*/
/*!
+ \fn PackageManagerCore::metaJobTotalProgress(int progress)
+
+ Triggered when the total \a progress value of the communication with a
+ remote repository changes.
+
+ \sa {installer::metaJobTotalProgress}{installer.metaJobTotalProgress}
+*/
+
+/*!
\fn PackageManagerCore::metaJobInfoMessage(const QString &message)
Triggered with informative updates, \a message, of the communication with a remote repository.
@@ -389,6 +398,12 @@ using namespace QInstaller;
Emitted when the GUI object is set to \a gui.
*/
+/*!
+ \fn PackageManagerCore::unstableComponentFound(const QString &type, const QString &errorMessage, const QString &component)
+
+ Emitted when an unstable \a component is found containing an unstable \a type and \a errorMessage.
+*/
+
Q_GLOBAL_STATIC(QMutex, globalModelMutex);
@@ -537,6 +552,7 @@ void PackageManagerCore::componentsToInstallNeedsRecalculation()
}
/*!
+ Forces a recalculation of components to install.
\sa {installer::clearComponentsToInstallCalculated}{installer.clearComponentsToInstallCalculated}
*/
void PackageManagerCore::clearComponentsToInstallCalculated()
@@ -1415,7 +1431,8 @@ void PackageManagerCore::addUserRepositories(const QStringList &repositories)
/*!
Sets additional \a repositories for this instance of the installer or updater
- if \a replace is \c false. Will be removed after invoking it again.
+ if \a replace is \c false. \a compressed repositories can be added as well.
+ Will be removed after invoking it again.
\sa {installer::setTemporaryRepositories}{installer.setTemporaryRepositories}
\sa addUserRepositories()
@@ -1655,6 +1672,11 @@ QList<Component*> PackageManagerCore::orderedComponentsToInstall() const
return d->installerCalculator()->orderedComponentsToInstall();
}
+/*!
+ Calculates components to install and uninstall. In case of an error, returns \c false
+ and and sets the \a displayString for error detail.
+*/
+
bool PackageManagerCore::calculateComponents(QString *displayString)
{
QString htmlOutput;
@@ -1823,6 +1845,10 @@ ComponentModel *PackageManagerCore::updaterComponentModel() const
return d->m_updaterModel;
}
+/*!
+ Updates all components silently without user interaction. In case there is an
+ essential update available, only the essential component will be updated.
+*/
void PackageManagerCore::updateComponentsSilently()
{
//Check if there are processes running in the install
@@ -2605,7 +2631,7 @@ bool PackageManagerCore::updateComponentData(struct Data &data, Component *compo
foreach (const QString packageName, d->m_metadataJob.shaMismatchPackages()) {
if (packageName == component->name()) {
QString errorString = QLatin1String("SHA mismatch detected for component ") + packageName;
- component->setUnstable(PackageManagerCore::UnstableError::ShaMismatch, errorString);
+ component->setUnstable(Component::UnstableError::ShaMismatch, errorString);
}
}
}
@@ -2979,16 +3005,26 @@ ComponentModel *PackageManagerCore::componentModel(PackageManagerCore *core, con
return model;
}
+/*!
+ Returns the file list used for delayed deletion.
+*/
QStringList PackageManagerCore::filesForDelayedDeletion() const
{
return d->m_filesForDelayedDeletion;
}
+/*!
+ Adds \a files for delayed deletion.
+*/
void PackageManagerCore::addFilesForDelayedDeletion(const QStringList &files)
{
d->m_filesForDelayedDeletion.append(files);
}
+/*!
+ Adds a colon symbol to the component \c name as a separator between
+ component \a name and version.
+*/
QString PackageManagerCore::checkableName(const QString &name)
{
// to ensure backward compatibility, fix component name with dash (-) symbol
@@ -2999,6 +3035,10 @@ QString PackageManagerCore::checkableName(const QString &name)
return name;
}
+/*!
+ Parses \a name and \a version from \a requirement component. \c requirement
+ contains both \a name and \a version separated either with ':' or with '-'.
+*/
void PackageManagerCore::parseNameAndVersion(const QString &requirement, QString *name, QString *version)
{
if (requirement.isEmpty()) {
@@ -3026,6 +3066,12 @@ void PackageManagerCore::parseNameAndVersion(const QString &requirement, QString
}
}
+/*!
+ Excludes version numbers from names from \a requirements components.
+ \a requirements list contains names that have both name and version.
+
+ Returns a list containing names without version numbers.
+*/
QStringList PackageManagerCore::parseNames(const QStringList &requirements)
{
QString name;