initial commit for deck repository tab

This commit is contained in:
Max-Wilhelm Bruker
2009-11-19 17:12:44 +01:00
parent c0e64f3f42
commit f31405743e
12 changed files with 1047 additions and 10 deletions

View File

@@ -187,6 +187,7 @@ void Response_DeckList::File::writeElement(QXmlStreamWriter *xml)
xml->writeStartElement("file");
xml->writeAttribute("name", name);
xml->writeAttribute("id", QString::number(id));
xml->writeAttribute("upload_time", QString::number(uploadTime.toTime_t()));
xml->writeEndElement();
}
@@ -207,7 +208,7 @@ bool Response_DeckList::Directory::readElement(QXmlStreamReader *xml)
currentItem = new Directory(xml->attributes().value("name").toString());
append(currentItem);
} else if (xml->isStartElement() && (xml->name() == "file")) {
currentItem = new File(xml->attributes().value("name").toString(), xml->attributes().value("id").toString().toInt());
currentItem = new File(xml->attributes().value("name").toString(), xml->attributes().value("id").toString().toInt(), QDateTime::fromTime_t(xml->attributes().value("upload_time").toString().toUInt()));
append(currentItem);
} else if (xml->isEndElement() && (xml->name() == "directory"))
return true;