Skip to content
Snippets Groups Projects
Commit 8f9d50d7 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Add error message if trying to load python plugin without PythonQt

parent 3be61640
No related branches found
No related tags found
No related merge requests found
......@@ -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());
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment