From 8f9d50d7c9e6f98f24bdf7aef33ea2ac0a0e829c Mon Sep 17 00:00:00 2001 From: Joseph Mirabel <jmirabel@laas.fr> Date: Thu, 15 Feb 2018 09:47:19 +0100 Subject: [PATCH] Add error message if trying to load python plugin without PythonQt --- src/gui/settings.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gui/settings.cc b/src/gui/settings.cc index 5192be5..c26a8f5 100644 --- a/src/gui/settings.cc +++ b/src/gui/settings.cc @@ -131,10 +131,8 @@ namespace gepetto { addEnvFromString (opt); while (arguments.read ("-p", opt) || arguments.read ("--load-plugin", opt)) addPlugin (QString::fromStdString(opt), !noPlugin); -#if GEPETTO_GUI_HAS_PYTHONQT while (arguments.read ("-q", opt) || arguments.read ("--load-pyplugin", opt)) addPyPlugin (QString::fromStdString(opt), !noPlugin); -#endif if (arguments.read("-c", configurationFile) || arguments.read("--config-file", configurationFile)) {} if (arguments.read("--predefined-robots", predifinedRobotConf)) {} @@ -192,6 +190,11 @@ namespace gepetto { } else pw->loadModulePlugin (name); } +#else + foreach (QString name, pyplugins_) { + logError ("gepetto-viewer-corba was compiled without GEPETTO_GUI_HAS_" + "PYTHONQT flag. Cannot not load Python plugin " + name); + } #endif } @@ -299,13 +302,11 @@ namespace gepetto { addPlugin (name, (noPlugin)?false:env.value(name, true).toBool()); } env.endGroup (); -#if GEPETTO_GUI_HAS_PYTHONQT env.beginGroup("pyplugins"); foreach (QString name, env.childKeys()) { addPyPlugin (name, (noPlugin)?false:env.value(name, true).toBool()); } env.endGroup (); -#endif log (QString ("Read configuration file ") + env.fileName()); } } -- GitLab