diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-07-14 12:03:25 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-07-14 21:54:32 +0300 |
commit | c82165a55701fe4ff604d7f30163051cd47c2363 (patch) | |
tree | 0e2a2059a3b28509b9b54ae76459a940e4fa24d1 /src/qt/bitcoin.h | |
parent | dbcf56b6c6e939923673b3f07bed7bb3632dbeb1 (diff) |
qt, refactor: Move InitExecutor class into its own module
This change makes InitExecutor class re-usable by an alternative GUI,
e.g., QML-based one.
Diffstat (limited to 'src/qt/bitcoin.h')
-rw-r--r-- | src/qt/bitcoin.h | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/src/qt/bitcoin.h b/src/qt/bitcoin.h index d3ef809582..ed2f26b7f3 100644 --- a/src/qt/bitcoin.h +++ b/src/qt/bitcoin.h @@ -10,13 +10,13 @@ #endif #include <interfaces/node.h> +#include <qt/initexecutor.h> #include <assert.h> #include <memory> #include <optional> #include <QApplication> -#include <QThread> class BitcoinGUI; class ClientModel; @@ -29,33 +29,6 @@ class WalletController; class WalletModel; -/** Class encapsulating Bitcoin Core startup and shutdown. - * Allows running startup and shutdown in a different thread from the UI thread. - */ -class InitExecutor: public QObject -{ - Q_OBJECT -public: - explicit InitExecutor(interfaces::Node& node); - ~InitExecutor(); - -public Q_SLOTS: - void initialize(); - void shutdown(); - -Q_SIGNALS: - void initializeResult(bool success, interfaces::BlockAndHeaderTipInfo tip_info); - void shutdownResult(); - void runawayException(const QString &message); - -private: - /// Pass fatal exception message to UI thread - void handleRunawayException(const std::exception *e); - - interfaces::Node& m_node; - QThread m_thread; -}; - /** Main Bitcoin application object */ class BitcoinApplication: public QApplication { |