1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-02-05 03:14:44 +00:00

Fixes to Web UI shutdown command

This commit is contained in:
Christophe Dumez 2012-08-21 18:50:09 +03:00
parent 399d957142
commit dac0d67717
2 changed files with 2 additions and 0 deletions

View File

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

View File

@ -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();