if someone jerked us around behind our back, then remove record of the cached version and try again

CCBUG:233051

svn path=/trunk/KDE/kdelibs/; revision=1158867
This commit is contained in:
Aaron J. Seigo 2010-08-04 01:00:26 +00:00
parent c42a1e3d78
commit d8078999a4

View File

@ -94,7 +94,12 @@ DataEngineConsumer::~DataEngineConsumer()
DataEngine *DataEngineConsumer::dataEngine(const QString &name)
{
if (m_loadedEngines.contains(name)) {
return DataEngineManager::self()->engine(name);
DataEngine *engine = DataEngineManager::self()->engine(name);
if (engine->isValid()) {
return engine;
} else {
m_loadedEngines.remove(name);
}
}
DataEngine *engine = DataEngineManager::self()->loadEngine(name);