Example #1
0
void BinTreeNodeReader::readAttributes(AttributeList& attribs, quint32 attribCount,
                                       QDataStream& in)
{
    QByteArray key, value;
    for (quint32 i=0; i < attribCount; i++)
    {
        readString(key, in);
        readString(value, in);
        attribs.insert(QString::fromUtf8(key),QString::fromUtf8(value));
    }
}
Example #2
0
bool BinTreeNodeReader::readAttributes(AttributeList& attribs, int attribCount)
{
    QByteArray key, value;
    for (int i=0; i < attribCount; i++)
    {
        if (readString(key) && readString(value)) {
            attribs.insert(QString::fromUtf8(key),QString::fromUtf8(value));
        } else {
            qDebug() << "failed to read attribute key:value";
            //TODO: return false;
        }
    }
    return true;
}