summaryrefslogtreecommitdiffstats
path: root/src/libs/kdtools/kdupdaterupdateoperationfactory.cpp
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@theqtcompany.com>2015-07-07 11:32:13 +0200
committerKarsten Heimrich <karsten.heimrich@theqtcompany.com>2015-07-10 08:54:06 +0000
commit38799ceaf111fb44665c1dd0e33896120d175ebc (patch)
tree7c3215dad4ec9f8962c44f2a915ba7809859cf45 /src/libs/kdtools/kdupdaterupdateoperationfactory.cpp
parent39a56f719a24a75e303d3a34f73a9c8cb1a01a34 (diff)
Make use of the new varadic template feature + cosmetic changes.
Change constructor to take the a package manager argument. Add a package manager member to the operation. Remove setter function. Change-Id: Iffb860e24089beb6496ac4ee479d547a29463728 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Diffstat (limited to 'src/libs/kdtools/kdupdaterupdateoperationfactory.cpp')
-rw-r--r--src/libs/kdtools/kdupdaterupdateoperationfactory.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/libs/kdtools/kdupdaterupdateoperationfactory.cpp b/src/libs/kdtools/kdupdaterupdateoperationfactory.cpp
index 3268facbe..a74658cc2 100644
--- a/src/libs/kdtools/kdupdaterupdateoperationfactory.cpp
+++ b/src/libs/kdtools/kdupdaterupdateoperationfactory.cpp
@@ -35,10 +35,8 @@
#include "kdupdaterupdateoperationfactory.h"
#include "kdupdaterupdateoperations.h"
-#include "packagemanagercore.h"
using namespace KDUpdater;
-using namespace QInstaller;
/*!
\inmodule kdupdater
@@ -64,10 +62,13 @@ using namespace QInstaller;
*/
/*!
+ \obsolete
\fn void KDUpdater::UpdateOperationFactory::registerUpdateOperation(const QString &name)
Registers a new update operation with the factory based on \a name. When create() is called
with that \a name, the update operation is constructed using its default constructor.
+
+ Deprecated. Use registerProduct() instead.
*/
/*!
@@ -93,11 +94,3 @@ UpdateOperationFactory::UpdateOperationFactory()
registerUpdateOperation<AppendFileOperation>(QLatin1String("AppendFile"));
registerUpdateOperation<PrependFileOperation>(QLatin1String("PrependFile"));
}
-
-UpdateOperation *UpdateOperationFactory::create(const QString &name, PackageManagerCore *core) const
-{
- UpdateOperation *operation = KDGenericFactory<UpdateOperation>::create(name);
- if (operation)
- operation->setPackageManager(core);
- return operation;
-}