Call node->initError instead of InitError from GUI code

Avoids GUI code calling a node function, and having to live in the same process
as g_ui_signals and uiInterface global variables.
This commit is contained in:
Russell Yanofsky
2019-07-11 18:20:44 -04:00
committed by MarcoFalke
parent fad2502240
commit fa6f402bde
3 changed files with 8 additions and 4 deletions

View File

@@ -54,6 +54,7 @@ class NodeImpl : public Node
{
public:
NodeImpl() { m_interfaces.chain = MakeChain(); }
void initError(const std::string& message) override { InitError(message); }
bool parseParameters(int argc, const char* const argv[], std::string& error) override
{
return gArgs.ParseParameters(argc, argv, error);

View File

@@ -38,6 +38,9 @@ class Node
public:
virtual ~Node() {}
//! Send init error.
virtual void initError(const std::string& message) = 0;
//! Set command line arguments.
virtual bool parseParameters(int argc, const char* const argv[], std::string& error) = 0;