connect(network, SIGNAL(currentServerSet(const QString &)), this, SLOT(sendPerform()));
connect(&socket, SIGNAL(connected()), this, SLOT(socketConnected()));
connect(network, SIGNAL(currentServerSet(const QString &)), this, SLOT(sendPerform()));
connect(&socket, SIGNAL(connected()), this, SLOT(socketConnected()));
- //connect(&socket, SIGNAL(disconnected()), this, SLOT(quit())); FIXME
+ connect(&socket, SIGNAL(disconnected()), this, SLOT(socketDisconnected()));
connect(&socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(socketError(QAbstractSocket::SocketError)));
connect(&socket, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(socketStateChanged(QAbstractSocket::SocketState)));
connect(&socket, SIGNAL(readyRead()), this, SLOT(socketHasData()));
connect(&socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(socketError(QAbstractSocket::SocketError)));
connect(&socket, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(socketStateChanged(QAbstractSocket::SocketState)));
connect(&socket, SIGNAL(readyRead()), this, SLOT(socketHasData()));
quint16 port = serverList[0]["Port"].toUInt();
displayStatusMsg(QString("Connecting to %1:%2...").arg(host).arg(port));
socket.connectToHost(host, port);
quint16 port = serverList[0]["Port"].toUInt();
displayStatusMsg(QString("Connecting to %1:%2...").arg(host).arg(port));
socket.connectToHost(host, port);
// FIXME switch to BufferId
void NetworkConnection::userInput(QString buf, QString msg) {
userInputHandler()->handleUserInput(buf, msg);
// FIXME switch to BufferId
void NetworkConnection::userInput(QString buf, QString msg) {
userInputHandler()->handleUserInput(buf, msg);