From dac0d67717ddc63d5cedf74b9f319508e5d030dd Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Tue, 21 Aug 2012 18:50:09 +0300 Subject: [PATCH] Fixes to Web UI shutdown command --- src/webui/httpconnection.cpp | 1 + src/webui/scripts/mocha-init.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/webui/httpconnection.cpp b/src/webui/httpconnection.cpp index 72db365d6..01d9f5ec8 100644 --- a/src/webui/httpconnection.cpp +++ b/src/webui/httpconnection.cpp @@ -284,6 +284,7 @@ void HttpConnection::respond() { // actually shutting down. m_generator.setStatusLine(200, "OK"); write(); + qApp->processEvents(); // Exit application qApp->exit(); } else { diff --git a/src/webui/scripts/mocha-init.js b/src/webui/scripts/mocha-init.js index 595ff2765..26140bdbb 100644 --- a/src/webui/scripts/mocha-init.js +++ b/src/webui/scripts/mocha-init.js @@ -288,6 +288,7 @@ initializeWindows = function(){ new Request({url: 'command/shutdown', onSuccess: function() { document.write("_(qBittorrent has been shutdown.)

_(qBittorrent has been shutdown.)

"); + stop(); } } ).send();