mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 00:54:53 -07:00
Improved login error message
This commit is contained in:
parent
a6ff54ae0e
commit
beecc0f970
5 changed files with 17 additions and 2 deletions
|
|
@ -8,6 +8,7 @@
|
|||
#include <QDebug>
|
||||
#include <QEvent>
|
||||
#include <QKeyEvent>
|
||||
#include <QMessageBox>
|
||||
#include <iostream>
|
||||
#include "dlg_connect.h"
|
||||
#include "settingscache.h"
|
||||
|
|
@ -149,6 +150,12 @@ void DlgConnect::actOk()
|
|||
settingsCache->servers().setPreviousHostList(hostList);
|
||||
settingsCache->servers().setPrevioushostindex(previousHosts->currentIndex());
|
||||
|
||||
if(playernameEdit->text().isEmpty())
|
||||
{
|
||||
QMessageBox::critical(this, tr("Connect Warning"), tr("The player name can't be empty."));
|
||||
return;
|
||||
}
|
||||
|
||||
accept();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue