don't re-use dataEngine in loadDataEngine so as to keep the api simple.

svn path=/trunk/KDE/kdebase/workspace/lib/plasma/; revision=670910
This commit is contained in:
Aaron J. Seigo 2007-06-02 22:57:55 +00:00
parent 591025b736
commit 452816cec8

View File

@ -100,9 +100,11 @@ Plasma::DataEngine* DataEngineManager::dataEngine(const QString& name) const
Plasma::DataEngine* DataEngineManager::loadDataEngine(const QString& name)
{
Plasma::DataEngine* engine = dataEngine(name);
Plasma::DataEngine* engine = 0;
Plasma::DataEngine::Dict::const_iterator it = d->m_engines.find(name);
if (engine) {
if (it != d->m_engines.end()) {
engine = *it;
engine->ref();
return engine;
}