Fixed a bug that allowed sending an empty string in the chat window.

This commit is contained in:
Denis Davydov 2018-07-28 11:00:32 +03:00
parent d5c9371a65
commit 61533a5989

View File

@ -38,6 +38,8 @@ void ChatWindow::sendMessage(QString msgText)
void ChatWindow::sendMsgButtonClicked() void ChatWindow::sendMsgButtonClicked()
{ {
QString msg = ui->msgEdit->text(); QString msg = ui->msgEdit->text();
if(msg == "")
return;
sendMessage(msg); sendMessage(msg);
ui->msgEdit->setText(""); ui->msgEdit->setText("");
} }