mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
feat: loading base version
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include "Core/recognizesystem.h"
|
||||
|
||||
#include "streamingversiondata.h"
|
||||
|
||||
#include <updatenotifywidget.h>
|
||||
|
||||
RecognizeSystem::RecognizeSystem(QObject *parent):
|
||||
@@ -80,7 +82,7 @@ void RecognizeSystem::recognize(QTcpSocket *socket)
|
||||
continue;
|
||||
}
|
||||
|
||||
filePath = Tools::createFullPath(filePath);
|
||||
filePath = Tools::createReceiveFullPath(filePath,updateController->getServerVersion());
|
||||
|
||||
QDir dir(filePath);
|
||||
if(!dir.exists()){
|
||||
@@ -115,7 +117,7 @@ void RecognizeSystem::recognize(QTcpSocket *socket)
|
||||
|
||||
}
|
||||
|
||||
filePath = Tools::createFullPath(filePath);
|
||||
filePath = Tools::createReceiveFullPath(filePath,updateController->getServerVersion());
|
||||
|
||||
emit sigSendDebugLog("CLIENT: filesize: " + QString::number(fileSize));
|
||||
emit sigSendDebugLog("CLIENT: filePath: " + filePath);
|
||||
@@ -198,7 +200,7 @@ void RecognizeSystem::recognize(QTcpSocket *socket)
|
||||
continue;
|
||||
}
|
||||
|
||||
filePath = Tools::createFullPath(filePath);
|
||||
filePath = Tools::createReceiveFullPath(filePath,updateController->getServerVersion());
|
||||
|
||||
QFileInfo fileInfo(filePath);
|
||||
|
||||
@@ -337,6 +339,28 @@ void RecognizeSystem::xmlParser(QByteArray array)
|
||||
emit sigSaveLoginData(serverAuth);
|
||||
}
|
||||
|
||||
if(xmlReader.name() == "VersionData")
|
||||
{
|
||||
StreamingVersionData *serverVersion = new StreamingVersionData;
|
||||
foreach(const QXmlStreamAttribute &attr,xmlReader.attributes())
|
||||
{
|
||||
QString name = attr.name().toString();
|
||||
QString value = attr.value().toString();
|
||||
|
||||
if(name == "Version")
|
||||
{
|
||||
serverVersion->setName(value);
|
||||
}
|
||||
|
||||
if(name == "Created")
|
||||
{
|
||||
serverVersion->setCreateData(QDateTime::fromString(value));
|
||||
}
|
||||
|
||||
}
|
||||
updateController->setServerVersion(serverVersion);
|
||||
}
|
||||
|
||||
xmlReader.readNext();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user