mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
confirmation dialog on close
This commit is contained in:
parent
da3ade3205
commit
ebd516fbf3
2 changed files with 11 additions and 8 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue