qmlFrontend/hwengine.cpp
branchqmlfrontend
changeset 11415 05cf35103206
parent 10951 89a7f617e091
child 11416 78d6b99ddcb0
--- a/qmlFrontend/hwengine.cpp	Wed Nov 18 22:18:39 2015 +0300
+++ b/qmlFrontend/hwengine.cpp	Thu Nov 19 23:04:53 2015 +0300
@@ -135,7 +135,7 @@
     HWEngine * obj = (HWEngine *)context;
     QByteArray b = QByteArray(msg, len);
 
-    qDebug() << "FLIPC in" << b.size() << b;
+    //qDebug() << "FLIPC in" << b.size() << b;
 
     QMetaObject::invokeMethod(obj, "engineMessageHandler", Qt::QueuedConnection, Q_ARG(MessageType, mt), Q_ARG(QByteArray, b));
 }
@@ -156,15 +156,15 @@
         break;
     }
     case MSG_REMOVEPLAYINGTEAM: {
-        emit playingTeamRemoved(msg);
+        emit playingTeamRemoved(QString::fromUtf8(msg));
         break;
     }
     case MSG_ADDTEAM: {
-        emit localTeamAdded(msg, 0);
+        emit localTeamAdded(QString::fromUtf8(msg), 0);
         break;
     }
     case MSG_REMOVETEAM: {
-        emit localTeamRemoved(msg);
+        emit localTeamRemoved(QString::fromUtf8(msg));
         break;
     }
     case MSG_TEAMCOLOR: {
@@ -174,6 +174,28 @@
     }
     case MSG_NETDATA: {
         flibPassNetData(msg.constData());
+        break;
+    }
+    case MSG_CONNECTED: {
+        emit netConnected();
+        break;
+    }
+    case MSG_DISCONNECTED: {
+        emit netDisconnected(QString::fromUtf8(msg));
+        break;
+    }
+    case MSG_ADDLOBBYCLIENT: {
+        emit lobbyClientAdded(QString::fromUtf8(msg));
+        break;
+    }
+    case MSG_REMOVELOBBYCLIENT: {
+        emit lobbyClientRemoved(QString::fromUtf8(msg));
+        break;
+    }
+    case MSG_LOBBYCHATLINE: {
+        QStringList l = QString::fromUtf8(msg).split('\n');
+        emit lobbyChatLine(l[0], l[1]);
+        break;
     }
     }
 }