Commit 4d29bfb 1 parent 5cb8099 commit 4d29bfb Copy full SHA for 4d29bfb
File tree 2 files changed +8
-10
lines changed
2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 15
15
#include < QString>
16
16
#include < QThread>
17
17
18
- InitExecutor::InitExecutor (interfaces::Node& node) :
19
- QObject(), m_node(node)
18
+ InitExecutor::InitExecutor (interfaces::Node& node)
19
+ : QObject(), m_node(node)
20
20
{
21
21
this ->moveToThread (&m_thread);
22
22
m_thread.start ();
@@ -30,16 +30,15 @@ InitExecutor::~InitExecutor()
30
30
qDebug () << __func__ << " : Stopped thread" ;
31
31
}
32
32
33
- void InitExecutor::handleRunawayException (const std::exception * e)
33
+ void InitExecutor::handleRunawayException (const std::exception * e)
34
34
{
35
35
PrintExceptionContinue (e, " Runaway exception" );
36
36
Q_EMIT runawayException (QString::fromStdString (m_node.getWarnings ().translated ));
37
37
}
38
38
39
39
void InitExecutor::initialize ()
40
40
{
41
- try
42
- {
41
+ try {
43
42
util::ThreadRename (" qt-init" );
44
43
qDebug () << __func__ << " : Running initialization in thread" ;
45
44
interfaces::BlockAndHeaderTipInfo tip_info;
@@ -54,8 +53,7 @@ void InitExecutor::initialize()
54
53
55
54
void InitExecutor::shutdown ()
56
55
{
57
- try
58
- {
56
+ try {
59
57
qDebug () << __func__ << " : Running Shutdown in thread" ;
60
58
m_node.appShutdown ();
61
59
qDebug () << __func__ << " : Shutdown finished" ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ QT_END_NAMESPACE
19
19
/* * Class encapsulating Bitcoin Core startup and shutdown.
20
20
* Allows running startup and shutdown in a different thread from the UI thread.
21
21
*/
22
- class InitExecutor : public QObject
22
+ class InitExecutor : public QObject
23
23
{
24
24
Q_OBJECT
25
25
public:
@@ -33,11 +33,11 @@ public Q_SLOTS:
33
33
Q_SIGNALS:
34
34
void initializeResult (bool success, interfaces::BlockAndHeaderTipInfo tip_info);
35
35
void shutdownResult ();
36
- void runawayException (const QString & message);
36
+ void runawayException (const QString& message);
37
37
38
38
private:
39
39
// / Pass fatal exception message to UI thread
40
- void handleRunawayException (const std::exception * e);
40
+ void handleRunawayException (const std::exception * e);
41
41
42
42
interfaces::Node& m_node;
43
43
QThread m_thread;
You can’t perform that action at this time.
0 commit comments