Browse Source

Fixes to Web UI shutdown command

adaptive-webui-19844
Christophe Dumez 12 years ago
parent
commit
dac0d67717
  1. 1
      src/webui/httpconnection.cpp
  2. 1
      src/webui/scripts/mocha-init.js

1
src/webui/httpconnection.cpp

@ -284,6 +284,7 @@ void HttpConnection::respond() { @@ -284,6 +284,7 @@ void HttpConnection::respond() {
// actually shutting down.
m_generator.setStatusLine(200, "OK");
write();
qApp->processEvents();
// Exit application
qApp->exit();
} else {

1
src/webui/scripts/mocha-init.js

@ -288,6 +288,7 @@ initializeWindows = function(){ @@ -288,6 +288,7 @@ initializeWindows = function(){
new Request({url: 'command/shutdown',
onSuccess: function() {
document.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"><html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>_(qBittorrent has been shutdown.)</title><style type=\"text/css\">body { text-align: center; }</style></head><body><h1>_(qBittorrent has been shutdown.)</h1></body></html>");
stop();
}
}
).send();

Loading…
Cancel
Save