From 6d572275a1ff002b880a19ff5535015e71b9cfc4 Mon Sep 17 00:00:00 2001 From: dnk-88 Date: Mon, 26 Sep 2011 12:36:04 +0300 Subject: [PATCH] Fixed: #1193 Plugin system checks dependency before loading plugins. --- .../src/extension_system/plugin_manager.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/extension_system/plugin_manager.cpp b/code/nel/tools/3d/object_viewer_qt/src/extension_system/plugin_manager.cpp index bcd90e351..8be6fcd93 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/extension_system/plugin_manager.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/extension_system/plugin_manager.cpp @@ -214,9 +214,6 @@ void PluginManager::setPluginState(PluginSpec *spec, int destState) switch (destState) { - case State::Loaded: - spec->loadLibrary(); - return; case State::Resolved: spec->resolveDependencies(m_pluginSpecs); return; @@ -234,13 +231,16 @@ void PluginManager::setPluginState(PluginSpec *spec, int destState) if (depSpec->state() != destState) { spec->m_hasError = true; - spec->m_errorString = tr("Cannot initializing plugin because dependency failed to load: %1\nReason: %2") - .arg(depSpec->name()).arg(depSpec->errorString()); + spec->m_errorString = tr("Cannot load plugin because dependency failed to load: %1") + .arg(depSpec->name()); return; } } switch (destState) { + case State::Loaded: + spec->loadLibrary(); + return; case State::Initialized: spec->initializePlugin(); break;