- BUGFIX: Bypass exit confirmation on system shutdown

This commit is contained in:
Christophe Dumez
2007-12-09 16:39:55 +00:00
parent 6ca93dfbae
commit bd546e3d18
2 changed files with 14 additions and 18 deletions

11
TODO
View File

@@ -53,12 +53,5 @@
TODO: TODO:
- Check search engine cpu usage - Check search engine cpu usage
rc9->rc10 changelog: rc10->? changelog:
- FEATURE: Greatly improved ETA calculation algorithm (use GASA) - BUGFIX: Bypass exit confirmation on system shutdown
- BUGFIX: Fixed proxy host max length in preferences
- BUGFIX: Added a 3 minutes search engine timeout
- BUGFIX: Limit search engine plugins to 10 result pages
- BUGFIX: Fixed nbResults != 0 when clearing results while a search is running
- BUGFIX: Fixed possible problem when closing to systray and cancelling app exit
- BUGFIX: Fixed preview when path contains spaces
- COSMETIC: Use more skin colors instead of hard coded ones

View File

@@ -449,7 +449,7 @@ void GUI::on_actionAbout_triggered() {
// Called when we close the program // Called when we close the program
void GUI::closeEvent(QCloseEvent *e) { void GUI::closeEvent(QCloseEvent *e) {
qDebug("Mainwindow received closeEvent");
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
bool goToSystrayOnExit = settings.value(QString::fromUtf8("Preferences/General/CloseToTray"), false).toBool(); bool goToSystrayOnExit = settings.value(QString::fromUtf8("Preferences/General/CloseToTray"), false).toBool();
if(!force_exit && systrayIntegration && goToSystrayOnExit && !this->isHidden()) { if(!force_exit && systrayIntegration && goToSystrayOnExit && !this->isHidden()) {
@@ -461,6 +461,7 @@ void GUI::closeEvent(QCloseEvent *e) {
show(); show();
if(!isMaximized()) if(!isMaximized())
showNormal(); showNormal();
if(e->spontaneous() == true || force_exit == true) {
if(QMessageBox::question(this, if(QMessageBox::question(this,
tr("Are you sure you want to quit?")+QString::fromUtf8(" -- ")+tr("qBittorrent"), tr("Are you sure you want to quit?")+QString::fromUtf8(" -- ")+tr("qBittorrent"),
tr("The download list is not empty.\nAre you sure you want to quit qBittorrent?"), tr("The download list is not empty.\nAre you sure you want to quit qBittorrent?"),
@@ -471,6 +472,7 @@ void GUI::closeEvent(QCloseEvent *e) {
return; return;
} }
} }
}
hide(); hide();
if(systrayIntegration) { if(systrayIntegration) {
// Hide tray icon // Hide tray icon
@@ -486,6 +488,7 @@ void GUI::closeEvent(QCloseEvent *e) {
qApp->exit(); qApp->exit();
} }
// Display window to create a torrent // Display window to create a torrent
void GUI::on_actionCreate_torrent_triggered() { void GUI::on_actionCreate_torrent_triggered() {
createtorrent *ct = new createtorrent(this); createtorrent *ct = new createtorrent(this);