diff options
author | Karsten Heimrich <karsten.heimrich@theqtcompany.com> | 2015-05-06 15:23:53 +0200 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@theqtcompany.com> | 2015-05-06 19:55:51 +0000 |
commit | 478a8a1db3eed2c41d46da966003cc1722bd347d (patch) | |
tree | a9d7bcbdbd91332101ee85a2b44c4a76f85bd5ab /tools | |
parent | a6fdda83c338357b848fe710274949917c58768f (diff) |
Remove pseudo static core instance, fixes autotests.
We need the core engine in operations anyway, so pass the pointer
to the create function instead of setting it on our own after the
operation was created. The only reason to introduce the static
was the ~UpdateOperation() destructor, which now can get the value
from its internal data instead of using the static instance call.
Change-Id: Ide27542837355ec8c642a6687ca02977983f84fa
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/devtool/operationrunner.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/devtool/operationrunner.cpp b/tools/devtool/operationrunner.cpp index 723d65cdf..8e232ef2e 100644 --- a/tools/devtool/operationrunner.cpp +++ b/tools/devtool/operationrunner.cpp @@ -60,7 +60,7 @@ int OperationRunner::runOperation(QStringList arguments, RunMode mode) try { const QString name = arguments.takeFirst(); QScopedPointer<QInstaller::Operation> op(KDUpdater::UpdateOperationFactory::instance() - .create(name)); + .create(name, m_core)); if (!op) { std::cerr << "Cannot instantiate operation: " << qPrintable(name) << std::endl; return EXIT_FAILURE; @@ -72,8 +72,6 @@ int OperationRunner::runOperation(QStringList arguments, RunMode mode) connect(object, SIGNAL(outputTextChanged(QString)), this, SLOT(print(QString))); } op->setArguments(arguments); - op->setValue(QLatin1String("installer"), QVariant::fromValue(m_core)); - bool readyPerformed = false; if (mode == RunMode::Do) |