don't try to load dataengines with and empty name
This commit is contained in:
parent
a08a3934f5
commit
857b0b8069
@ -96,6 +96,10 @@ void DataSource::setupData()
|
||||
qDeleteAll(m_services);
|
||||
m_services.clear();
|
||||
|
||||
if (m_engine.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_dataEngineConsumer = new Plasma::DataEngineConsumer();
|
||||
Plasma::DataEngine *engine = dataEngine(m_engine);
|
||||
if (!engine) {
|
||||
|
@ -121,6 +121,10 @@ Plasma::DataEngine *DataEngineManager::engine(const QString &name) const
|
||||
|
||||
Plasma::DataEngine *DataEngineManager::loadEngine(const QString &name)
|
||||
{
|
||||
if (name.isEmpty()) {
|
||||
qDebug() << "Asked an engine with empty name";
|
||||
return d->nullEngine();
|
||||
}
|
||||
Plasma::DataEngine::Dict::const_iterator it = d->engines.constFind(name);
|
||||
|
||||
if (it != d->engines.constEnd()) {
|
||||
@ -131,6 +135,7 @@ Plasma::DataEngine *DataEngineManager::loadEngine(const QString &name)
|
||||
|
||||
DataEngine *engine = PluginLoader::self()->loadDataEngine(name);
|
||||
if (!engine) {
|
||||
qDebug() << "Can't find a dataengine named" << name;
|
||||
// Try installing the engine. However, it's too late for this request.
|
||||
ComponentInstaller::self()->installMissingComponent("dataengine", name);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user