mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-19 21:04:32 -05:00
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:
parent
8b36ac51e5
commit
db74c9ef58
@ -624,31 +624,16 @@ void MainWindow::createActions()
|
|||||||
*/
|
*/
|
||||||
void MainWindow::doQuit()
|
void MainWindow::doQuit()
|
||||||
{
|
{
|
||||||
RshareSettings rsharesettings;
|
QString queryWrn;
|
||||||
QString key (UI_PREF_PROMPT_ON_QUIT);
|
queryWrn.clear();
|
||||||
bool doConfirm = rsharesettings.value(key, QVariant(true)).toBool();
|
queryWrn.append("Do you really want to quit and stop all transfers?");
|
||||||
if (doConfirm)
|
|
||||||
{
|
|
||||||
ConfirmQuitDialog * confirm = new ConfirmQuitDialog;
|
|
||||||
confirm->exec();
|
|
||||||
// save configuration setting
|
|
||||||
if (confirm->reminderCheckBox->checkState() == Qt::Checked)
|
|
||||||
{
|
|
||||||
rsharesettings.setValue(key, QVariant(false));
|
|
||||||
}
|
|
||||||
|
|
||||||
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();
|
qApp->quit();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::closeEvent(QCloseEvent *e)
|
void MainWindow::closeEvent(QCloseEvent *e)
|
||||||
@ -665,7 +650,7 @@ void MainWindow::closeEvent(QCloseEvent *e)
|
|||||||
firstTime = false;
|
firstTime = false;
|
||||||
}
|
}
|
||||||
hide();
|
hide();
|
||||||
e->ignore();
|
e->ignore();p
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user