PluginInvoke.h header
#include <ew/app/PluginInvoke.h>
Namespace ew::app
Functions
QWidget * ew::app::plugin::buildPluginPanel(const PluginPanel &panel, PluginAppContext &context, QString *error)
Builds panel's widget through its factory, or returns null with error set.
The factory is third-party code, and it runs long after load: when the host mounts the panels for a project. A factory that throws propagated out of the mount and killed the window – the same failure the load path had until F-0083, at the other end of the plugin's life (F-0084). A null return without error is the documented "this plugin declines to build its panel" case and is not an error.
error is set only when the factory threw; it names the plugin panel so the user can tell which one to remove.
bool ew::app::plugin::runPluginCommand(const PluginMenuCommand &command, PluginAppContext &context, QString *error)
Runs command's handler, reporting false with error set when it throws.
This one is not merely defensive. The handler runs from a QAction::triggered slot, and CODING_STANDARDS section 6.5 states that an exception must not escape a Qt slot – Qt's own documentation makes throwing through the event loop undefined behaviour, so a plugin command that threw was not "an error the user sees", it was a terminated process (F-0084).