replaced doquit with normal QMessageBox

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1108 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2009-04-02 20:28:12 +00:00
parent 8b36ac51e5
commit db74c9ef58

View File

@ -624,31 +624,16 @@ void MainWindow::createActions()
*/
void MainWindow::doQuit()
{
RshareSettings rsharesettings;
QString key (UI_PREF_PROMPT_ON_QUIT);
bool doConfirm = rsharesettings.value(key, QVariant(true)).toBool();
if (doConfirm)
{
ConfirmQuitDialog * confirm = new ConfirmQuitDialog;
confirm->exec();
// save configuration setting
if (confirm->reminderCheckBox->checkState() == Qt::Checked)
{
rsharesettings.setValue(key, QVariant(false));
}
QString queryWrn;
queryWrn.clear();
queryWrn.append("Do you really want to quit and stop all transfers?");
if (confirm->result() == QDialog::Accepted)
if ((QMessageBox::question(this, tr("Really quit ? "),queryWrn,QMessageBox::Ok|QMessageBox::No, QMessageBox::Ok))== QMessageBox::Ok)
{
rsicontrol->rsGlobalShutDown();
qApp->quit();
} else {
delete confirm;
}
} else {
rsicontrol->rsGlobalShutDown();
qApp->quit();
}
else
return;
}
void MainWindow::closeEvent(QCloseEvent *e)
@ -665,7 +650,7 @@ void MainWindow::closeEvent(QCloseEvent *e)
firstTime = false;
}
hide();
e->ignore();
e->ignore();p
}
}