summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/component.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/installer/component.cpp')
-rw-r--r--src/libs/installer/component.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/libs/installer/component.cpp b/src/libs/installer/component.cpp
index dddca9f14..217e41eea 100644
--- a/src/libs/installer/component.cpp
+++ b/src/libs/installer/component.cpp
@@ -43,7 +43,6 @@
#include "remoteclient.h"
#include "settings.h"
-#include <kdupdaterupdatesourcesinfo.h>
#include <kdupdaterupdateoperationfactory.h>
#include <productkeycheck.h>
@@ -241,7 +240,7 @@ Component::~Component()
/*!
Sets variables according to the values set in the package.xml file of a local \a package.
*/
-void Component::loadDataFromPackage(const LocalPackage &package)
+void Component::loadDataFromPackage(const KDUpdater::LocalPackage &package)
{
setValue(scName, package.name);
// pixmap ???
@@ -286,7 +285,7 @@ void Component::loadDataFromPackage(const Package &package)
setValue(scAutoDependOn, package.data(scAutoDependOn).toString());
setValue(scCompressedSize, package.data(scCompressedSize).toString());
setValue(scUncompressedSize, package.data(scUncompressedSize).toString());
- setValue(scRemoteVersion, package.data(scRemoteVersion).toString());
+ setValue(scVersion, package.data(scVersion).toString());
setValue(scInheritVersion, package.data(scInheritVersion).toString());
setValue(scDependencies, package.data(scDependencies).toString());
setValue(scDownloadableArchives, package.data(scDownloadableArchives).toString());
@@ -818,7 +817,7 @@ void Component::addDownloadableArchive(const QString &path)
Q_ASSERT(isFromOnlineRepository());
qDebug() << "addDownloadable" << path;
- d->m_downloadableArchives.append(d->m_vars.value(scRemoteVersion) + path);
+ d->m_downloadableArchives.append(d->m_vars.value(scVersion) + path);
}
/*!
@@ -897,15 +896,14 @@ OperationList Component::operations() const
if (!d->m_minimumProgressOperation) {
d->m_minimumProgressOperation = KDUpdater::UpdateOperationFactory::instance()
- .create(QLatin1String("MinimumProgress"));
+ .create(QLatin1String("MinimumProgress"), d->m_core);
d->m_minimumProgressOperation->setValue(QLatin1String("component"), name());
d->m_operations.append(d->m_minimumProgressOperation);
}
if (!d->m_licenses.isEmpty()) {
d->m_licenseOperation = KDUpdater::UpdateOperationFactory::instance()
- .create(QLatin1String("License"));
- d->m_licenseOperation->setValue(QLatin1String("installer"), QVariant::fromValue(d->m_core));
+ .create(QLatin1String("License"), d->m_core);
d->m_licenseOperation->setValue(QLatin1String("component"), name());
QVariantMap licenses;
@@ -979,7 +977,8 @@ Operation *Component::createOperation(const QString &operationName, const QStrin
Operation *Component::createOperation(const QString &operationName, const QStringList &parameters)
{
- Operation *operation = KDUpdater::UpdateOperationFactory::instance().create(operationName);
+ Operation *operation = KDUpdater::UpdateOperationFactory::instance().create(operationName,
+ d->m_core);
if (operation == 0) {
const QMessageBox::StandardButton button =
MessageBoxHandler::critical(MessageBoxHandler::currentBestSuitParent(),
@@ -992,7 +991,6 @@ Operation *Component::createOperation(const QString &operationName, const QStrin
if (operation->name() == QLatin1String("Delete"))
operation->setValue(QLatin1String("performUndo"), false);
- operation->setValue(QLatin1String("installer"), qVariantFromValue(d->m_core));
operation->setArguments(d->m_core->replaceVariables(parameters));
operation->setValue(QLatin1String("component"), name());