mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
feat: add file data complete
This commit is contained in:
@@ -149,6 +149,7 @@ void UpdateController::saveHash(QString fileName,QList<FileData> *fileList)
|
||||
|
||||
xmlWriter.writeAttribute("Path",data.path);
|
||||
xmlWriter.writeAttribute("Hash",data.hash);
|
||||
xmlWriter.writeAttribute("LastUpdate",data.lastUpdate);
|
||||
|
||||
xmlWriter.writeEndElement();
|
||||
}
|
||||
@@ -162,6 +163,7 @@ void UpdateController::saveHash(QString fileName,QList<FileData> *fileList)
|
||||
|
||||
QList<FileData>* UpdateController::loadHash(QString filename)
|
||||
{
|
||||
//TODO: дублируется функционал DataParser
|
||||
QList<FileData> *files = new QList<FileData>();
|
||||
|
||||
QFile hashFile(filename);
|
||||
@@ -190,6 +192,8 @@ QList<FileData>* UpdateController::loadHash(QString filename)
|
||||
data.path = value;
|
||||
else if(name == "Hash")
|
||||
data.hash = value;
|
||||
else if(name == "LastUpdate")
|
||||
data.lastUpdate = value;
|
||||
}
|
||||
|
||||
files->append(data);
|
||||
|
||||
Reference in New Issue
Block a user