firehose application shutdown · feather-wallet/feather@37aa04e · GitHub
Skip to content

Commit 37aa04e

Browse files
committed
firehose application shutdown
1 parent 4b197dd commit 37aa04e

6 files changed

Lines changed: 12 additions & 6 deletions

File tree

‎src/Application.cpp‎

Lines changed: 1 addition & 0 deletions

‎src/MainWindow.cpp‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1207,6 +1207,7 @@ void MainWindow::closeEvent(QCloseEvent *event) {
12071207
qDebug() << Q_FUNC_INFO;
12081208

12091209
if (!this->cleanedUp) {
1210+
qDebug() << "MainWindow: cleaning up";
12101211
this->cleanedUp = true;
12111212

12121213
emit aboutToQuit();
@@ -1934,5 +1935,5 @@ int MainWindow::findTab(const QString &title) {
19341935
}
19351936

19361937
MainWindow::~MainWindow() {
1937-
qDebug() << "~MainWindow";
1938+
qDebug() << "~MainWindow" << QThread::currentThreadId();
19381939
}

‎src/WindowManager.cpp‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ WindowManager::~WindowManager() {
6767
qDebug() << "~WindowManager";
6868
m_cleanupThread->quit();
6969
m_cleanupThread->wait();
70-
qDebug() << "Cleanup thread done";
70+
qDebug() << "WindowManager: cleanup thread done" << QThread::currentThreadId();
7171
}
7272

7373
// ######################## APPLICATION LIFECYCLE ########################
@@ -82,7 +82,7 @@ void WindowManager::quitAfterLastWindow() {
8282
}
8383

8484
void WindowManager::close() {
85-
qDebug() << Q_FUNC_INFO;
85+
qDebug() << Q_FUNC_INFO << QThread::currentThreadId();
8686
for (const auto &window: m_windows) {
8787
window->close();
8888
}
@@ -102,12 +102,14 @@ void WindowManager::close() {
102102

103103
torManager()->stop();
104104

105+
deleteLater();
106+
105107
qDebug() << "Calling QApplication::quit()";
106108
QApplication::quit();
107109
}
108110

109111
void WindowManager::closeWindow(MainWindow *window) {
110-
qDebug() << "closing Window";
112+
qDebug() << "WindowManager: closing Window";
111113
m_windows.removeOne(window);
112114

113115
// Move Wallet to a different thread for cleanup, so it doesn't block GUI thread

‎src/libwalletqt/Wallet.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1431,7 +1431,7 @@ void Wallet::getTxPoolStatsAsync() {
14311431

14321432
Wallet::~Wallet()
14331433
{
1434-
qDebug("~Wallet: Closing wallet");
1434+
qDebug() << "~Wallet: Closing wallet" << QThread::currentThreadId();
14351435

14361436
pauseRefresh();
14371437
m_walletImpl->stop();
@@ -1448,5 +1448,5 @@ Wallet::~Wallet()
14481448

14491449
delete m_walletImpl;
14501450
m_walletImpl = nullptr;
1451-
qDebug("m_walletImpl deleted");
1451+
qDebug() << "m_walletImpl deleted" << QThread::currentThreadId();
14521452
}

‎src/libwalletqt/WalletManager.cpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ WalletManager::WalletManager(QObject *parent)
312312

313313
WalletManager::~WalletManager()
314314
{
315+
qDebug() << "~WalletManager" << QThread::currentThreadId();
315316
m_scheduler.shutdownWaitForFinished();
316317
}
317318

‎src/utils/scheduler.cpp‎

Lines changed: 1 addition & 0 deletions

0 commit comments

Comments
 (0)