remove DataEngine::init()

with only one ctor is not necessary anymore
This commit is contained in:
Marco Martin 2013-04-04 18:07:18 +02:00
parent 4875658944
commit f9adc7a598
3 changed files with 8 additions and 24 deletions

View File

@ -52,6 +52,14 @@ DataEngine::DataEngine(const KPluginInfo &plugin, QObject *parent)
: QObject(parent),
d(new DataEnginePrivate(this, plugin))
{
if (d->script) {
d->setupScriptSupport();
d->script->init();
} else {
// kDebug() << "called";
// default implementation does nothing. this is for engines that have to
// start things in motion external to themselves before they can work
}
}
DataEngine::~DataEngine()
@ -130,18 +138,6 @@ DataContainer *DataEngine::containerForSource(const QString &source)
return d->source(source, false);
}
void DataEngine::init()
{
if (d->script) {
d->setupScriptSupport();
d->script->init();
} else {
// kDebug() << "called";
// default implementation does nothing. this is for engines that have to
// start things in motion external to themselves before they can work
}
}
bool DataEngine::sourceRequestEvent(const QString &name)
{
if (d->script) {

View File

@ -75,17 +75,6 @@ class PLASMA_EXPORT DataEngine : public QObject
~DataEngine();
/**
* This method is called when the DataEngine is started. When this
* method is called the DataEngine is fully constructed and ready to be
* used. This method should be reimplemented by DataEngine subclasses
* which need to perform a startup routine.
*
* The default implementation does nothing. Reimplementations in
* subclasses don't need to call this one.
**/
virtual void init();
/**
* @return a list of all the data sources available via this DataEngine
* Whether these sources are currently available (which is what

View File

@ -138,7 +138,6 @@ Plasma::DataEngine *DataEngineManager::loadEngine(const QString &name)
return d->nullEngine();
}
engine->init();
d->engines[name] = engine;
return engine;
}