mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-01-02 08:10:28 -08:00
XML fix
This commit is contained in:
@@ -73,18 +73,15 @@ void ServerSocketInterface::readClient()
|
||||
qDebug() << data;
|
||||
xmlReader->addData(data);
|
||||
|
||||
if (topLevelItem)
|
||||
topLevelItem->read(xmlReader);
|
||||
else
|
||||
while (!xmlReader->atEnd()) {
|
||||
xmlReader->readNext();
|
||||
if (xmlReader->isStartElement() && (xmlReader->name().toString() == "cockatrice_client_stream")) {
|
||||
topLevelItem = new TopLevelProtocolItem;
|
||||
connect(topLevelItem, SIGNAL(protocolItemReceived(ProtocolItem *)), this, SLOT(processProtocolItem(ProtocolItem *)));
|
||||
|
||||
topLevelItem->read(xmlReader);
|
||||
}
|
||||
while (!xmlReader->atEnd()) {
|
||||
xmlReader->readNext();
|
||||
if (topLevelItem)
|
||||
topLevelItem->readElement(xmlReader);
|
||||
else if (xmlReader->isStartElement() && (xmlReader->name().toString() == "cockatrice_client_stream")) {
|
||||
topLevelItem = new TopLevelProtocolItem;
|
||||
connect(topLevelItem, SIGNAL(protocolItemReceived(ProtocolItem *)), this, SLOT(processProtocolItem(ProtocolItem *)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ServerSocketInterface::catchSocketError(QAbstractSocket::SocketError socketError)
|
||||
|
||||
Reference in New Issue
Block a user