mirror of
https://git.wownero.com/wowlet/wowlet.git
synced 2024-08-15 01:03:14 +00:00
Fix indefinite hang when closing wallet via File -> Quit
This commit is contained in:
parent
103965ef40
commit
3feda6d6c7
2 changed files with 11 additions and 4 deletions
|
@ -894,6 +894,8 @@ void MainWindow::menuNewRestoreClicked() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::menuQuitClicked() {
|
void MainWindow::menuQuitClicked() {
|
||||||
|
cleanupBeforeClose();
|
||||||
|
|
||||||
QCoreApplication::quit();
|
QCoreApplication::quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -967,10 +969,7 @@ void MainWindow::homeWidgetChanged(const QString &widgetName) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::closeEvent(QCloseEvent *event) {
|
void MainWindow::closeEvent(QCloseEvent *event) {
|
||||||
m_ctx->walletManager->closeWallet();
|
cleanupBeforeClose();
|
||||||
m_ctx->tor->stop();
|
|
||||||
|
|
||||||
this->saveGeo();
|
|
||||||
|
|
||||||
QWidget::closeEvent(event);
|
QWidget::closeEvent(event);
|
||||||
}
|
}
|
||||||
|
@ -1141,6 +1140,13 @@ void MainWindow::importOutputs() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::cleanupBeforeClose() {
|
||||||
|
m_ctx->walletManager->closeWallet();
|
||||||
|
m_ctx->tor->stop();
|
||||||
|
|
||||||
|
this->saveGeo();
|
||||||
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow() {
|
MainWindow::~MainWindow() {
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,6 +125,7 @@ private:
|
||||||
|
|
||||||
static MainWindow * pMainWindow;
|
static MainWindow * pMainWindow;
|
||||||
void closeEvent(QCloseEvent *event) override;
|
void closeEvent(QCloseEvent *event) override;
|
||||||
|
void cleanupBeforeClose();
|
||||||
void create_status_bar();
|
void create_status_bar();
|
||||||
void initMain();
|
void initMain();
|
||||||
void loadSkins();
|
void loadSkins();
|
||||||
|
|
Loading…
Reference in a new issue