mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
dynamic compression support
This commit is contained in:
parent
cc795a2dd7
commit
d892d320ea
9 changed files with 85 additions and 13 deletions
|
|
@ -74,7 +74,7 @@ TopLevelProtocolItem::TopLevelProtocolItem()
|
|||
bool TopLevelProtocolItem::readCurrentItem(QXmlStreamReader *xml)
|
||||
{
|
||||
if (currentItem) {
|
||||
if (currentItem->readElement(xml)) {
|
||||
if (currentItem->read(xml)) {
|
||||
emit protocolItemReceived(currentItem);
|
||||
currentItem = 0;
|
||||
}
|
||||
|
|
@ -92,6 +92,8 @@ bool TopLevelProtocolItem::readElement(QXmlStreamReader *xml)
|
|||
currentItem = dynamic_cast<ProtocolItem *>(getNewItem(childName + childSubType));
|
||||
if (!currentItem)
|
||||
currentItem = new ProtocolItem_Invalid;
|
||||
if (xml->attributes().value("comp").toString().toInt() == 1)
|
||||
currentItem->setCompressed(true);
|
||||
|
||||
readCurrentItem(xml);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue