add ctor with a KPluginInfo

This commit is contained in:
Marco Martin 2013-04-04 17:43:30 +02:00
parent 5af5da2687
commit 037a86530d
2 changed files with 16 additions and 0 deletions

View File

@ -54,6 +54,12 @@ DataEngine::DataEngine(QObject *parent, KService::Ptr service)
{
}
DataEngine::DataEngine(QObject *parent, const KPluginInfo &plugin)
: 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()))))

View File

@ -72,6 +72,16 @@ class PLASMA_EXPORT DataEngine : public QObject
* @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);
DataEngine(QObject *parent, const QVariantList &args);
~DataEngine();