Skip to content

Commit 4d29bfb

Browse files
committed
qt, refactor: Fix code styling of moved InitExecutor class
1 parent 5cb8099 commit 4d29bfb

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

src/qt/initexecutor.cpp

+5-7
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
#include <QString>
1616
#include <QThread>
1717

18-
InitExecutor::InitExecutor(interfaces::Node& node) :
19-
QObject(), m_node(node)
18+
InitExecutor::InitExecutor(interfaces::Node& node)
19+
: QObject(), m_node(node)
2020
{
2121
this->moveToThread(&m_thread);
2222
m_thread.start();
@@ -30,16 +30,15 @@ InitExecutor::~InitExecutor()
3030
qDebug() << __func__ << ": Stopped thread";
3131
}
3232

33-
void InitExecutor::handleRunawayException(const std::exception *e)
33+
void InitExecutor::handleRunawayException(const std::exception* e)
3434
{
3535
PrintExceptionContinue(e, "Runaway exception");
3636
Q_EMIT runawayException(QString::fromStdString(m_node.getWarnings().translated));
3737
}
3838

3939
void InitExecutor::initialize()
4040
{
41-
try
42-
{
41+
try {
4342
util::ThreadRename("qt-init");
4443
qDebug() << __func__ << ": Running initialization in thread";
4544
interfaces::BlockAndHeaderTipInfo tip_info;
@@ -54,8 +53,7 @@ void InitExecutor::initialize()
5453

5554
void InitExecutor::shutdown()
5655
{
57-
try
58-
{
56+
try {
5957
qDebug() << __func__ << ": Running Shutdown in thread";
6058
m_node.appShutdown();
6159
qDebug() << __func__ << ": Shutdown finished";

src/qt/initexecutor.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ QT_END_NAMESPACE
1919
/** Class encapsulating Bitcoin Core startup and shutdown.
2020
* Allows running startup and shutdown in a different thread from the UI thread.
2121
*/
22-
class InitExecutor: public QObject
22+
class InitExecutor : public QObject
2323
{
2424
Q_OBJECT
2525
public:
@@ -33,11 +33,11 @@ public Q_SLOTS:
3333
Q_SIGNALS:
3434
void initializeResult(bool success, interfaces::BlockAndHeaderTipInfo tip_info);
3535
void shutdownResult();
36-
void runawayException(const QString &message);
36+
void runawayException(const QString& message);
3737

3838
private:
3939
/// Pass fatal exception message to UI thread
40-
void handleRunawayException(const std::exception *e);
40+
void handleRunawayException(const std::exception* e);
4141

4242
interfaces::Node& m_node;
4343
QThread m_thread;

0 commit comments

Comments
 (0)