mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-21 00:18:43 +00:00
Fixed: #1193 Plugin system checks dependency before loading plugins.
This commit is contained in:
parent
5f8789e98f
commit
6d572275a1
1 changed files with 5 additions and 5 deletions
|
@ -214,9 +214,6 @@ void PluginManager::setPluginState(PluginSpec *spec, int destState)
|
||||||
|
|
||||||
switch (destState)
|
switch (destState)
|
||||||
{
|
{
|
||||||
case State::Loaded:
|
|
||||||
spec->loadLibrary();
|
|
||||||
return;
|
|
||||||
case State::Resolved:
|
case State::Resolved:
|
||||||
spec->resolveDependencies(m_pluginSpecs);
|
spec->resolveDependencies(m_pluginSpecs);
|
||||||
return;
|
return;
|
||||||
|
@ -234,13 +231,16 @@ void PluginManager::setPluginState(PluginSpec *spec, int destState)
|
||||||
if (depSpec->state() != destState)
|
if (depSpec->state() != destState)
|
||||||
{
|
{
|
||||||
spec->m_hasError = true;
|
spec->m_hasError = true;
|
||||||
spec->m_errorString = tr("Cannot initializing plugin because dependency failed to load: %1\nReason: %2")
|
spec->m_errorString = tr("Cannot load plugin because dependency failed to load: %1")
|
||||||
.arg(depSpec->name()).arg(depSpec->errorString());
|
.arg(depSpec->name());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch (destState)
|
switch (destState)
|
||||||
{
|
{
|
||||||
|
case State::Loaded:
|
||||||
|
spec->loadLibrary();
|
||||||
|
return;
|
||||||
case State::Initialized:
|
case State::Initialized:
|
||||||
spec->initializePlugin();
|
spec->initializePlugin();
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue