Skip to content

Commit

Permalink
Plugin manager: all our solvers should be loaded when in CLI mode (#2234
Browse files Browse the repository at this point in the history
).

This ensures that we can do whatever we want from Python when in "CLI mode". If we are in GUI mode, we want to allow the user to be able to select whatever solver s/he wants to have. When it comes to Python support, if a solver is not loaded but needed by a Python script, then we will get an error (see commit d51e966).
  • Loading branch information
agarny committed Nov 27, 2019
1 parent d51e966 commit 7582459
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/plugins/pluginmanager.cpp
Expand Up @@ -120,11 +120,11 @@ PluginManager::PluginManager(bool pGuiMode) :

if (pluginInfo != nullptr) {
// Keep track of the plugin itself, should it be selectable and
// requested by the user (if we are in GUI mode) or have CLI support
// (if we are in CLI mode)
// requested by the user (if we are in GUI mode), or have CLI
// support or is a solver (if we are in CLI mode)

if ( ( pGuiMode && pluginInfo->isSelectable() && Plugin::load(pluginName))
|| (!pGuiMode && pluginInfo->hasCliSupport())) {
|| (!pGuiMode && (pluginInfo->hasCliSupport() || (pluginInfo->category() == PluginInfo::Category::Solver)))) {
// Keep track of the plugin's dependencies

neededPlugins << pluginsInfo.value(pluginName)->fullDependencies();
Expand Down

0 comments on commit 7582459

Please sign in to comment.