only one constructor remains

explicit DataEngine(const KPluginInfo &plugin, QObject *parent = 0);
This commit is contained in:
Marco Martin 2013-04-04 18:05:03 +02:00
parent fe803e1c79
commit 4875658944
4 changed files with 4 additions and 26 deletions

View File

@ -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! ";

View File

@ -65,24 +65,14 @@ class PLASMA_EXPORT DataEngine : public QObject
typedef QHashIterator<QString, QVariant> DataIterator;
typedef QHash<QString, DataContainer*> 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();
/**

View File

@ -253,7 +253,7 @@ DataEngine *PluginLoader::loadDataEngine(const QString &name)
}
}
} else {
engine = new DataEngine(0, offers.first());
engine = new DataEngine(KPluginInfo(offers.first()), 0);
}
}

View File

@ -42,7 +42,7 @@ class NullEngine : public DataEngine
{
public:
NullEngine(QObject *parent = 0)
: DataEngine(parent)
: DataEngine(KPluginInfo(), parent)
{
setValid(false);