gui: Replace interface::Node references with pointers
No change in behavior. Replacing references with pointers allows Node interface creation to be delayed until later during gui startup next commit to support implementing -ipcconnect option
This commit is contained in:
1 parent
91aced7c7e
commit
102abff9eb
9 files changed
+74
-41
No files matched your search
+8
-2
@@ -10,6 +10,7 @@
|
||||
#endif
|
||||
|
||||
#include <QApplication>
|
||||
#include <assert.h>
|
||||
#include <memory>
|
||||
|
||||
#include <interfaces/node.h>
|
||||
@@ -20,6 +21,7 @@ class NetworkStyle;
|
||||
class OptionsModel;
|
||||
class PaymentServer;
|
||||
class PlatformStyle;
|
||||
class SplashScreen;
|
||||
class WalletController;
|
||||
class WalletModel;
|
||||
|
||||
@@ -54,7 +56,7 @@ class BitcoinApplication: public QApplication
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit BitcoinApplication(interfaces::Node& node);
|
||||
explicit BitcoinApplication();
|
||||
~BitcoinApplication();
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
@@ -88,6 +90,9 @@ public:
|
||||
/// Setup platform style
|
||||
void setupPlatformStyle();
|
||||
|
||||
interfaces::Node& node() const { assert(m_node); return *m_node; }
|
||||
void setNode(interfaces::Node& node);
|
||||
|
||||
public Q_SLOTS:
|
||||
void initializeResult(bool success, interfaces::BlockAndHeaderTipInfo tip_info);
|
||||
void shutdownResult();
|
||||
@@ -102,7 +107,6 @@ Q_SIGNALS:
|
||||
|
||||
private:
|
||||
QThread *coreThread;
|
||||
interfaces::Node& m_node;
|
||||
OptionsModel *optionsModel;
|
||||
ClientModel *clientModel;
|
||||
BitcoinGUI *window;
|
||||
@@ -114,6 +118,8 @@ private:
|
||||
int returnValue;
|
||||
const PlatformStyle *platformStyle;
|
||||
std::unique_ptr<QWidget> shutdownWindow;
|
||||
SplashScreen* m_splash = nullptr;
|
||||
interfaces::Node* m_node = nullptr;
|
||||
|
||||
void startThread();
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user