mirror of
https://github.com/monero-project/monero-gui.git
synced 2026-04-01 21:27:26 -04:00
filter: intercept quit event to avoid deadlock
This commit is contained in:
10
main.qml
10
main.qml
@@ -100,6 +100,7 @@ ApplicationWindow {
|
||||
property bool splashDisplayedBeforeButtonRequest;
|
||||
property bool themeTransition: false
|
||||
property int backgroundSyncType: Wallet.BackgroundSync_Off;
|
||||
property bool isQuitting: false
|
||||
|
||||
// fiat price conversion
|
||||
property real fiatPrice: 0
|
||||
@@ -282,6 +283,15 @@ ApplicationWindow {
|
||||
persistentSettings.kdfRounds);
|
||||
}
|
||||
|
||||
function gracefulQuit() {
|
||||
if (isQuitting)
|
||||
return;
|
||||
isQuitting = true;
|
||||
closeWallet(function() {
|
||||
Qt.quit();
|
||||
})
|
||||
}
|
||||
|
||||
function closeWallet(callback) {
|
||||
|
||||
// Disconnect all listeners
|
||||
|
||||
Reference in New Issue
Block a user