QT for some reason messes with XCompose causing broken input (Qt 5 only - Qt 4 did not break anything). In Qt 5.2 and 5.3 this was causing an invalid conversion in chat messages containing these resulting in the bad bytes being stripped. In Qt 5.9 it is still broken, but you at least get a string with something in it. This checks for non-zero converted strings for room creation and chat lines.
--- a/QTfrontend/net/newnetclient.cpp Fri Apr 13 00:17:30 2018 +0200
+++ b/QTfrontend/net/newnetclient.cpp Fri Apr 13 13:03:51 2018 -0400
@@ -99,7 +99,7 @@
void HWNewNet::CreateRoom(const QString & room, const QString & password)
{
- if(netClientState != InLobby)
+ if(netClientState != InLobby || !ByteLength(room))
{
qWarning("Illegal try to create room!");
return;
@@ -176,6 +176,11 @@
RawSendNet(QString("EM%1%2").arg(delimiter).arg(msg));
}
+int HWNewNet::ByteLength(const QString & str)
+{
+ return str.toUtf8().size();
+}
+
void HWNewNet::RawSendNet(const QString & str)
{
RawSendNet(str.toUtf8());
@@ -909,7 +914,7 @@
void HWNewNet::chatLineToNet(const QString& str)
{
- if(str != "")
+ if(ByteLength(str))
{
RawSendNet(QString("CHAT") + delimiter + str);
QString action = HWProto::chatStringToAction(str);
@@ -922,7 +927,7 @@
void HWNewNet::chatLineToLobby(const QString& str)
{
- if(str != "")
+ if(ByteLength(str))
{
RawSendNet(QString("CHAT") + delimiter + str);
QString action = HWProto::chatStringToAction(str);
--- a/QTfrontend/net/newnetclient.h Fri Apr 13 00:17:30 2018 +0200
+++ b/QTfrontend/net/newnetclient.h Fri Apr 13 13:03:51 2018 -0400
@@ -84,6 +84,7 @@
QStringList cmdbuf;
+ int ByteLength(const QString & str);
void RawSendNet(const QString & buf);
void RawSendNet(const QByteArray & buf);
void ParseCmd(const QStringList & lst);