mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Fixes to Web UI shutdown command
This commit is contained in:
parent
399d957142
commit
dac0d67717
2 changed files with 2 additions and 0 deletions
|
@ -284,6 +284,7 @@ void HttpConnection::respond() {
|
||||||
// actually shutting down.
|
// actually shutting down.
|
||||||
m_generator.setStatusLine(200, "OK");
|
m_generator.setStatusLine(200, "OK");
|
||||||
write();
|
write();
|
||||||
|
qApp->processEvents();
|
||||||
// Exit application
|
// Exit application
|
||||||
qApp->exit();
|
qApp->exit();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -288,6 +288,7 @@ initializeWindows = function(){
|
||||||
new Request({url: 'command/shutdown',
|
new Request({url: 'command/shutdown',
|
||||||
onSuccess: function() {
|
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>");
|
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();
|
).send();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue