confirmation dialog on close

This commit is contained in:
Zach H 2015-07-14 19:53:13 -04:00
parent da3ade3205
commit ebd516fbf3
2 changed files with 11 additions and 8 deletions

View file

@ -71,7 +71,7 @@ void MainWindow::processConnectionClosedEvent(const Event_ConnectionClosed &even
client->disconnectFromServer();
QString reasonStr;
switch (event.reason()) {
case Event_ConnectionClosed::USER_LIMIT_REACHED: reasonStr = tr("The server has reached its maximum user capacity, please check back later."); break;
case Event_ConnectionClosed::USER_LIMIT_REACHED: reasonStr = tr("The server has reached its maximum user capacity, please check back later."); break;
case Event_ConnectionClosed::TOO_MANY_CONNECTIONS: reasonStr = tr("There are too many concurrent connections from your address."); break;
case Event_ConnectionClosed::BANNED: {
reasonStr = tr("Banned by moderator");
@ -632,7 +632,7 @@ void MainWindow::closeEvent(QCloseEvent *event)
{
// workaround Qt bug where closeEvent gets called twice
static bool bClosingDown=false;
if(bClosingDown)
if (bClosingDown)
return;
bClosingDown=true;