mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
feat: add authors
This commit is contained in:
@@ -58,6 +58,10 @@ void ProcessParser::read(ClientHandler *client, QByteArray array)
|
||||
|
||||
clientNotify(xmlReader,client);
|
||||
}
|
||||
else if(xmlReader.name() == "DataInfo")
|
||||
{
|
||||
clientDataInfo(xmlReader,client);
|
||||
}
|
||||
else
|
||||
{
|
||||
emit sigLogMessage("XmlParser: unrecognized tag");
|
||||
@@ -68,6 +72,25 @@ void ProcessParser::read(ClientHandler *client, QByteArray array)
|
||||
}//while(!xmlReader.atEnd())
|
||||
}
|
||||
|
||||
void ProcessParser::clientDataInfo(QXmlStreamReader &xmlReader,ClientHandler *client)
|
||||
{
|
||||
DataInfo *dataInfo = new DataInfo;
|
||||
|
||||
foreach(const QXmlStreamAttribute &attr, xmlReader.attributes())
|
||||
{
|
||||
QString name = attr.name().toString();
|
||||
QString value = attr.value().toString();
|
||||
|
||||
if(name == "path")
|
||||
dataInfo->path= value.toUtf8();
|
||||
|
||||
if(name == "size")
|
||||
dataInfo->size = value.toLong();
|
||||
}
|
||||
|
||||
processingSystem->setCurrentDataInfo(dataInfo);
|
||||
|
||||
}
|
||||
void ProcessParser::clientAuth(QXmlStreamReader &xmlReader,ClientHandler *client)
|
||||
{
|
||||
ClientAutorization clientAutorization;
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
#define PROCESSPARSER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <Data/typesDataServerClient.h>
|
||||
#include <qxmlstream.h>
|
||||
#include <clienthandler.h>
|
||||
#include "Data/typesDataServerClient.h"
|
||||
|
||||
class ProcessParser : public QObject
|
||||
{
|
||||
@@ -26,6 +26,7 @@ private:
|
||||
void queryTasksXML(QXmlStreamReader &xmlReader,ClientHandler *client);
|
||||
void clientMessage(QXmlStreamReader &xmlReader,ClientHandler *client);
|
||||
void clientNotify(QXmlStreamReader &xmlReader,ClientHandler *client);
|
||||
void clientDataInfo(QXmlStreamReader &xmlReader, ClientHandler *client);
|
||||
};
|
||||
|
||||
#endif // PROCESSPARSER_H
|
||||
|
||||
@@ -286,7 +286,9 @@ void AssetsManager::writeVersionsToFile(QList<StreamingVersionData*> version,boo
|
||||
if(isFirst)
|
||||
{
|
||||
attribute3 = {"isChangeable",QString::number(false)};
|
||||
attribute4 = {"author",tr("Константа-дизайн")};
|
||||
QString author = tr("Константа-дизайн");
|
||||
attribute4 = {"author",author};
|
||||
ver->setAuthor(author);
|
||||
}else
|
||||
{
|
||||
attribute3 ={"isChangeable",QString::number(ver->getIsChangeable())};
|
||||
|
||||
@@ -24,6 +24,7 @@ void ProcessingSystem::initialize(ServerLMSWidget *server,
|
||||
|
||||
connect(this,&ProcessingSystem::sigAuthChanged,commonClientHandler, &CommonClientHandler::slot_AuthChanged,Qt::AutoConnection);
|
||||
connect(this,&ProcessingSystem::sigUpdateListClients,server, &ServerLMSWidget::slotUpdateListClients,Qt::AutoConnection);
|
||||
connect(this,&ProcessingSystem::sigSetData,updateController,&UpdateController::setDataInfo,Qt::AutoConnection);
|
||||
connect(this,&ProcessingSystem::signal_msgToClientReady,commonClientHandler, &CommonClientHandler::slot_msgToClientFromGUI);
|
||||
connect(this,&ProcessingSystem::signal_msgFromClientReady,commonClientHandler, &CommonClientHandler::slot_msgToGUIfromClient);
|
||||
connect(this,&ProcessingSystem::sigLogMessage,logger,&Logger::addTextToLogger,Qt::QueuedConnection);
|
||||
@@ -322,5 +323,10 @@ void ProcessingSystem::processingClientNotify(ClientHandler *client, ClientNotif
|
||||
}
|
||||
}
|
||||
|
||||
void ProcessingSystem::setCurrentDataInfo(DataInfo *dataInfo)
|
||||
{
|
||||
emit sigSetData(dataInfo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ public:
|
||||
void processingFromClientMessage(ClientHandler *client, ClientMessage clientMessage);
|
||||
void processingClientNotify(ClientHandler *client, ClientNotify clientNotify);
|
||||
|
||||
void setCurrentDataInfo(DataInfo *dataInfo);
|
||||
signals:
|
||||
void sigUpdateListClients();
|
||||
void sigAuthChanged();
|
||||
@@ -45,6 +46,7 @@ signals:
|
||||
void sigAddToMessanger(QString login,QString text);
|
||||
void signal_msgToClientReady(QString login, QString text);
|
||||
void signal_msgFromClientReady(QString login, QString text);
|
||||
void sigSetData(DataInfo *dataInfo);
|
||||
|
||||
private:
|
||||
CommonClientHandler *commonClientServer;
|
||||
|
||||
@@ -193,6 +193,11 @@ void UpdateController::setUpCurrentServerHash()
|
||||
saveHash(hashFileName,fileList);
|
||||
}
|
||||
|
||||
void UpdateController::setDataInfo(DataInfo *value)
|
||||
{
|
||||
dataInfo = value;
|
||||
}
|
||||
|
||||
QString UpdateController::getCurrentStreamingPath() const
|
||||
{
|
||||
return currentStreamingPath;
|
||||
|
||||
@@ -56,6 +56,8 @@ public:
|
||||
QString getPathAdditionalFile(QString name);
|
||||
|
||||
StreamingVersionData *getCurrentVersion();
|
||||
void setDataInfo(DataInfo *value);
|
||||
|
||||
public slots:
|
||||
void changeAssetVersion(QString versionName);
|
||||
void createCopyVersion(QString versionName,QString newVersionName,QString author);
|
||||
|
||||
Reference in New Issue
Block a user