mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-10-22 18:56:08 +03:00
Require password to exit qBittorrent from tray icon when locked (closes #311)
This commit is contained in:
parent
8d36a03f68
commit
db638319c7
1 changed files with 7 additions and 0 deletions
|
@ -659,6 +659,13 @@ void MainWindow::on_actionSet_global_download_limit_triggered() {
|
||||||
// Necessary if we want to close the window
|
// Necessary if we want to close the window
|
||||||
// in one time if "close to systray" is enabled
|
// in one time if "close to systray" is enabled
|
||||||
void MainWindow::on_actionExit_triggered() {
|
void MainWindow::on_actionExit_triggered() {
|
||||||
|
// UI locking enforcement.
|
||||||
|
if (isHidden() && ui_locked) {
|
||||||
|
// Ask for UI lock password
|
||||||
|
if (!unlockUI())
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
force_exit = true;
|
force_exit = true;
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue