From 4875658944aa4aefef501733018a6d7456184ec1 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 4 Apr 2013 18:05:03 +0200 Subject: [PATCH] only one constructor remains explicit DataEngine(const KPluginInfo &plugin, QObject *parent = 0); --- src/plasma/dataengine.cpp | 14 +------------- src/plasma/dataengine.h | 12 +----------- src/plasma/pluginloader.cpp | 2 +- src/plasma/private/dataenginemanager.cpp | 2 +- 4 files changed, 4 insertions(+), 26 deletions(-) diff --git a/src/plasma/dataengine.cpp b/src/plasma/dataengine.cpp index be6fb54e8..d5093687c 100644 --- a/src/plasma/dataengine.cpp +++ b/src/plasma/dataengine.cpp @@ -48,24 +48,12 @@ namespace Plasma { -DataEngine::DataEngine(QObject *parent, KService::Ptr service) - : QObject(parent), - d(new DataEnginePrivate(this, KPluginInfo(service))) -{ -} - -DataEngine::DataEngine(QObject *parent, const KPluginInfo &plugin) +DataEngine::DataEngine(const KPluginInfo &plugin, QObject *parent) : QObject(parent), d(new DataEnginePrivate(this, plugin)) { } -DataEngine::DataEngine(QObject *parent, const QVariantList &args) - : QObject(parent), - d(new DataEnginePrivate(this, KPluginInfo(KService::serviceByStorageId(args.count() > 0 ? args[0].toString() : QString())))) -{ -} - DataEngine::~DataEngine() { //kDebug() << objectName() << ": bye bye birdy! "; diff --git a/src/plasma/dataengine.h b/src/plasma/dataengine.h index b332f2c40..d38edd09a 100644 --- a/src/plasma/dataengine.h +++ b/src/plasma/dataengine.h @@ -65,24 +65,14 @@ class PLASMA_EXPORT DataEngine : public QObject typedef QHashIterator DataIterator; typedef QHash SourceDict; - /** - * Constructor. - * - * @param parent The parent object. - * @param service pointer to the service that describes the engine - **/ - explicit DataEngine(QObject *parent = 0, KService::Ptr service = KService::Ptr(0)); - /** * Constructor. * * @param parent The parent object. * @param plugin plugin info that describes the engine - * TODO: default parameters when the other ctors are removed **/ - explicit DataEngine(QObject *parent, const KPluginInfo &plugin); + explicit DataEngine(const KPluginInfo &plugin, QObject *parent = 0); - DataEngine(QObject *parent, const QVariantList &args); ~DataEngine(); /** diff --git a/src/plasma/pluginloader.cpp b/src/plasma/pluginloader.cpp index f6ffde98d..671140a8c 100644 --- a/src/plasma/pluginloader.cpp +++ b/src/plasma/pluginloader.cpp @@ -253,7 +253,7 @@ DataEngine *PluginLoader::loadDataEngine(const QString &name) } } } else { - engine = new DataEngine(0, offers.first()); + engine = new DataEngine(KPluginInfo(offers.first()), 0); } } diff --git a/src/plasma/private/dataenginemanager.cpp b/src/plasma/private/dataenginemanager.cpp index a3a6dfd51..0c11b1544 100644 --- a/src/plasma/private/dataenginemanager.cpp +++ b/src/plasma/private/dataenginemanager.cpp @@ -42,7 +42,7 @@ class NullEngine : public DataEngine { public: NullEngine(QObject *parent = 0) - : DataEngine(parent) + : DataEngine(KPluginInfo(), parent) { setValid(false);