- Ask for exit confirmation only if the download list is not empty

This commit is contained in:
Christophe Dumez 2007-04-04 00:47:26 +00:00
parent c6c4bc1277
commit c832d91f79
51 changed files with 5561 additions and 3657 deletions

View file

@ -652,12 +652,12 @@ void GUI::closeEvent(QCloseEvent *e){
e->ignore();
return;
}
if(settings.value("Options/Misc/Behaviour/ConfirmOnExit", true).toBool()){
if(settings.value("Options/Misc/Behaviour/ConfirmOnExit", true).toBool() && nbTorrents != 0){
show();
showNormal();
if(QMessageBox::question(this,
tr("Are you sure you want to quit?")+" -- "+tr("qBittorrent"),
tr("Are you sure you want to quit qBittorrent?"),
tr("The download list is not empty.\nAre you sure you want to quit qBittorrent?"),
tr("&Yes"), tr("&No"),
QString(), 0, 1)){
e->ignore();