ref: clean unused in Core

This commit is contained in:
semenov
2025-08-15 14:47:57 +03:00
parent 87db4d0ef4
commit 3c65c4b08c
22 changed files with 1983 additions and 2083 deletions

View File

@@ -22,17 +22,15 @@
class UpdateController : public QObject class UpdateController : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit UpdateController(QObject *parent = 0); explicit UpdateController(QObject *parent = 0);
~UpdateController();
void initialize(VersionContainer *versionContainer,DataParserOutput *dataParser, SendSystem *sendSystem); void initialize(VersionContainer *versionContainer,DataParserOutput *dataParser, SendSystem *sendSystem);
void calculateCommonHash(); void calculateCommonHash();
void calculateStreamingHash(); void calculateStreamingHash();
~UpdateController();
void updateFilesOnServer(QList<FileData> *fileSendList); void updateFilesOnServer(QList<FileData> *fileSendList);
void checkCanUpdate(); void checkCanUpdate();

View File

@@ -134,9 +134,7 @@ void DataParser::xmlParser(const QByteArray& array)
if (value == "UNCHANGEABLE") if (value == "UNCHANGEABLE")
{ {
//emit sigNotify(tr("Нельзя выгружать в базовую версию")); //версию нельзя изменять
//postProcessSystem->showUpdateList();
//emit recognizeSystem->sigShowUpdateList();
} }
if (value == "CHANGEABLE") if (value == "CHANGEABLE")

View File

@@ -19,14 +19,10 @@ class DataParser : public QObject
public: public:
explicit DataParser(QObject *parent = 0); explicit DataParser(QObject *parent = 0);
~DataParser() = default; ~DataParser() = default;
void initialize(PostProcessorSystem *postProcessSystem); void initialize(PostProcessorSystem *postProcessSystem);
ServerSettings* getClientSettings(); ServerSettings* getClientSettings();
void xmlParser(const QByteArray& array); void xmlParser(const QByteArray& array);
signals:
void sigNotify(QString notify);
void sigUpdateFilesOnServer(QList<FileData> *fileSendList);
private: private:
PostProcessorSystem *postProcessSystem; PostProcessorSystem *postProcessSystem;
}; };

View File

@@ -49,11 +49,6 @@ void PostProcessorSystem::startCompare()
emit sigStartCompare(serverStreamingHash,*localStreamingHash); emit sigStartCompare(serverStreamingHash,*localStreamingHash);
} }
void PostProcessorSystem::showUpdateList()
{
emit sigShowUpdateList();
}
void PostProcessorSystem::compareFiles() void PostProcessorSystem::compareFiles()
{ {
updateController->updateFilesOnServer(hashComparer->getFilesForUpdate()); updateController->updateFilesOnServer(hashComparer->getFilesForUpdate());

View File

@@ -19,19 +19,15 @@ public:
void socketDisable(); void socketDisable();
void serverBlocked(); void serverBlocked();
void startCompare(); void startCompare();
void showUpdateList();
void compareFiles(); void compareFiles();
void checkAccessType(const QString& type); void checkAccessType(const QString& type);
void saveLoginData(ServerAuthorization *auth); void saveLoginData(ServerAuthorization *auth);
void setServerVersion(StreamingVersionData *serverVersion); void setServerVersion(StreamingVersionData *serverVersion);
void showServerDataList(QList<StreamingVersionData*> *versionList);
void calculateCommonHash(); void calculateCommonHash();
signals: signals:
void sigSocketDisabled(); void sigSocketDisabled();
void sigServerBlocked(); void sigServerBlocked();
void sigStartCompare(QList<FileData> *serverStreamingHash, QList<FileData> localStreamingHash); void sigStartCompare(QList<FileData> *serverStreamingHash, QList<FileData> localStreamingHash);
void sigShowUpdateList();
void sigCallUpdateList(); void sigCallUpdateList();
void sigSaveLoginData(ServerAuthorization *serverAuth); void sigSaveLoginData(ServerAuthorization *serverAuth);

View File

@@ -9,11 +9,9 @@ RecognizeSystem::RecognizeSystem(QObject *parent):
packetType = PacketType::TYPE_NONE; packetType = PacketType::TYPE_NONE;
filePath.clear(); filePath.clear();
fileSize = 0; fileSize = 0;
message.clear();
sizeReceiveData = 0; sizeReceiveData = 0;
tmpBlock.clear(); tmpBlock.clear();
countSend = 0; countSend = 0;
folderList = new QList<QString>;
} }
void RecognizeSystem::initialize(DataParser *dataParser, VersionContainer *versionContainer,PostProcessorSystem *postProcessorSystem) void RecognizeSystem::initialize(DataParser *dataParser, VersionContainer *versionContainer,PostProcessorSystem *postProcessorSystem)

View File

@@ -13,37 +13,29 @@
#include <Data\streamingversiondata.h> #include <Data\streamingversiondata.h>
#include <Core\hashcomparer.h> #include <Core\hashcomparer.h>
class ServerAuthorization;
class RecognizeSystem : public QObject class RecognizeSystem : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit RecognizeSystem(QObject *parent = 0); explicit RecognizeSystem(QObject *parent = 0);
~RecognizeSystem(){}; ~RecognizeSystem(){};
void initialize(DataParser *dataParser, VersionContainer* versionContainer,PostProcessorSystem *postProcessorSystem); void initialize(DataParser *dataParser, VersionContainer* versionContainer,PostProcessorSystem *postProcessorSystem);
void recognize(QTcpSocket *socket); void recognize(QTcpSocket *socket);
void showServerDataList(QList<StreamingVersionData*> *showServerDataList);
signals: signals:
void sigUpdateBytesAvailable(); void sigUpdateBytesAvailable();
void sigLoadComplete(); void sigLoadComplete();
void sigNeedUpdate(bool flag,qint64 size,quint64 fileCount,quint64 fileDelete); void sigNeedUpdate(bool flag,qint64 size,quint64 fileCount,quint64 fileDelete);
void sigSendDebugLog(QString message); void sigSendDebugLog(QString message);
void sigSocketWaitForReadyRead(int waitTime);
void sigAnimationActivated(bool flag); void sigAnimationActivated(bool flag);
void sigCheckUpdate(); void sigCheckUpdate();
void sigdRecalculateHashOnServerState(); void sigdRecalculateHashOnServerState();
private: private:
QList<QString> *folderList;
VersionContainer *versionContainer; VersionContainer *versionContainer;
DataParser *dataParser; DataParser *dataParser;
PostProcessorSystem *postProcessorSystem; PostProcessorSystem *postProcessorSystem;
PacketType packetType; PacketType packetType;
QString message;
QString filePath; QString filePath;
QByteArray tmpBlock; QByteArray tmpBlock;

View File

@@ -121,11 +121,6 @@ void ScreenChecker::updateDisplayData()
dataParserOutput->addRunData(*displaysIndexList); dataParserOutput->addRunData(*displaysIndexList);
} }
QString ScreenChecker::getScreenCount() const
{
return QString::number(screenCount);
}
void ScreenChecker::initialize(DataParserOutput *dataParserOutput, QHBoxLayout *layout) void ScreenChecker::initialize(DataParserOutput *dataParserOutput, QHBoxLayout *layout)
{ {
this->layout = layout; this->layout = layout;

View File

@@ -16,7 +16,6 @@
#include <Data/monitorInfo.h> #include <Data/monitorInfo.h>
class DataParser;
class ScreenChecker : public QObject class ScreenChecker : public QObject
{ {
Q_OBJECT Q_OBJECT
@@ -26,11 +25,8 @@ public:
void initialize(DataParserOutput *dataParserOutput, QHBoxLayout *layout); void initialize(DataParserOutput *dataParserOutput, QHBoxLayout *layout);
~ScreenChecker(); ~ScreenChecker();
void check(); void check();
QString getScreenCount() const;
private: private:
QWidget *mainWidget;
DataParserOutput *dataParserOutput; DataParserOutput *dataParserOutput;
QHBoxLayout *layout; QHBoxLayout *layout;
qint64 screenCount; qint64 screenCount;

View File

@@ -167,35 +167,6 @@ void SendSystem::sendFinish()
socket->waitForReadyRead(100); socket->waitForReadyRead(100);
} }
void SendSystem::sendChangeVersion(StreamingVersionData* streamingVersion)
{
QDataStream stream(socket);
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
stream << PacketType::CHANGE_DATA_VERSION;
stream << streamingVersion->getViewName();
socket->waitForReadyRead(100);
}
void SendSystem::sendDeleteVersion(StreamingVersionData *streamingVersion)
{
QDataStream stream(socket);
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
stream << PacketType::DELETE_DATA_VERSION;
stream << streamingVersion->getViewName();
socket->waitForReadyRead(100);
}
void SendSystem::sendCopyVersion(const QString& versionName)
{
QDataStream stream(socket);
stream.setVersion(QDataStream::Qt_DefaultCompiledVersion);
stream << PacketType::COPY_VERSION;
stream << versionName;
}
void SendSystem::sendPacketType(PacketType packetType) void SendSystem::sendPacketType(PacketType packetType)
{ {
QDataStream stream(socket); QDataStream stream(socket);

View File

@@ -16,19 +16,14 @@ public:
explicit SendSystem(QObject* parent = nullptr); explicit SendSystem(QObject* parent = nullptr);
void setSocket(QTcpSocket *socket); void setSocket(QTcpSocket *socket);
void sendClientAutorization(); void sendClientAutorization();
void sendDisable();
void sendFileBlock(const QString& path); void sendFileBlock(const QString& path);
void sendFolderBlock(const QString& path); void sendFolderBlock(const QString& path);
void sendFileBlockWithVersion(const QString& localPath,const QString& serverPath); void sendFileBlockWithVersion(const QString& localPath,const QString& serverPath);
void sendQTConnect(); void sendQTConnect();
void sendXMLAnswer(const QByteArray& array); void sendXMLAnswer(const QByteArray& array);
void sendFinish(); void sendFinish();
void sendChangeVersion(StreamingVersionData *streamingVersion);
void sendDeleteVersion(StreamingVersionData *streamingVersion);
void sendCopyVersion(const QString& versionName);
void sendCheckHash(); void sendCheckHash();
void sendPacketType(PacketType packetType); void sendPacketType(PacketType packetType);
~SendSystem(){}; ~SendSystem(){};
signals: signals:
void sigSend(); void sigSend();

View File

@@ -14,9 +14,6 @@ void TCPClient::initialize(RecognizeSystem *recognize,SendSystem *sendSystem)
this->recognizeSystem = recognize; this->recognizeSystem = recognize;
this->sendSystem = sendSystem; this->sendSystem = sendSystem;
isConnected = false; isConnected = false;
connect(recognize,&RecognizeSystem::sigSocketWaitForReadyRead,this,&TCPClient::waitRead,Qt::DirectConnection);
emit sigSendDebugLog(Tools::getTime() + " Client started"); emit sigSendDebugLog(Tools::getTime() + " Client started");
} }
@@ -59,17 +56,6 @@ void TCPClient::setDisconnect()
emit sigSendDebugLog("Server disabled"); emit sigSendDebugLog("Server disabled");
} }
void TCPClient:: waitRead(int time)
{
socket->waitForReadyRead(time);
}
QTcpSocket *TCPClient::getSocket()
{
return socket;
}
void TCPClient::slotConnectNotify() void TCPClient::slotConnectNotify()
{ {
if(socket->state() != QTcpSocket::ConnectedState) if(socket->state() != QTcpSocket::ConnectedState)

View File

@@ -14,23 +14,14 @@
#include <Core\tools.h> #include <Core\tools.h>
#include <Core\externalexecuter.h> #include <Core\externalexecuter.h>
class UpdateController;
class RecognizeSystem;
class ServerSettings;
class TCPClient : public QObject class TCPClient : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit TCPClient(QObject *parent = 0); explicit TCPClient(QObject *parent = 0);
void initialize(RecognizeSystem *recognize,SendSystem *sendSystem); void initialize(RecognizeSystem *recognize,SendSystem *sendSystem);
void setConnect(ServerSettings *serverSettings); void setConnect(ServerSettings *serverSettings);
void waitRead(int time);
QTcpSocket* getSocket();
~TCPClient(){}; ~TCPClient(){};
bool getIsConnected() const; bool getIsConnected() const;

View File

@@ -11,11 +11,6 @@ VersionContainer::~VersionContainer()
} }
QString VersionContainer::getServerVersion() const
{
return serverVersionData->getViewName();
}
QString VersionContainer::getLocalVersion() const QString VersionContainer::getLocalVersion() const
{ {
return localVersionData->getViewName(); return localVersionData->getViewName();

View File

@@ -10,8 +10,6 @@ class VersionContainer : public QObject
public: public:
explicit VersionContainer(QObject *parent = nullptr); explicit VersionContainer(QObject *parent = nullptr);
~VersionContainer(); ~VersionContainer();
QString getServerVersion() const;
QString getLocalVersion() const; QString getLocalVersion() const;
StreamingVersionData *getLocalVersionData() const; StreamingVersionData *getLocalVersionData() const;

View File

@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<AuthData Login="O1" Password="1111" InstructorName="" ClientName="Иванов И.И." AccessType="trainee"/> <AuthData Login="I1" Password="1111" InstructorName="Горинин Г.Г." ClientName="Горинин Г.Г." AccessType="instructor"/>

File diff suppressed because it is too large Load Diff

View File

@@ -208,7 +208,7 @@
<FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/Packets/ind.packet" Hash="9957a195581db76aa700ab777663f365"/> <FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/Packets/ind.packet" Hash="9957a195581db76aa700ab777663f365"/>
<FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/Packets/indOld.packet" Hash="1425cfadb547a04c6299697fc04174b7"/> <FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/Packets/indOld.packet" Hash="1425cfadb547a04c6299697fc04174b7"/>
<FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/Packets/ind_engineer.packet" Hash="2a6c22e9a2d3699a7b677fa45e499af5"/> <FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/Packets/ind_engineer.packet" Hash="2a6c22e9a2d3699a7b677fa45e499af5"/>
<FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/RRJ-95NEW-100/docs.xml" Hash="0209133c3166ced5467e3b4299928c1b"/> <FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/RRJ-95NEW-100/docs.xml" Hash="9276f64d8fb2c654c1ed9a6cf55294c4"/>
<FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/RRJ-95NEW-100/MathParams.xml" Hash="29b15fc4e799787a181996237c23a2a9"/> <FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/RRJ-95NEW-100/MathParams.xml" Hash="29b15fc4e799787a181996237c23a2a9"/>
<FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/RRJ-95NEW-100/tasksFIM.xml" Hash="6e29a8516f67f562ad75eb7100e996f6"/> <FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/RRJ-95NEW-100/tasksFIM.xml" Hash="6e29a8516f67f562ad75eb7100e996f6"/>
<FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/RUS/Docs/AMM/PMC-RRJNEW-AA62F-AMM00-00_004-00_ru-RU.pdf" Hash="34e4cfc0dfd96c127798f766203aa9fe"/> <FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/RUS/Docs/AMM/PMC-RRJNEW-AA62F-AMM00-00_004-00_ru-RU.pdf" Hash="34e4cfc0dfd96c127798f766203aa9fe"/>
@@ -8845,6 +8845,7 @@
<FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/RUS/Procs/ITEM/ICN-RRJ-R-SP7101-0-AA62F-12980-A-001-01.png" Hash="0c4d8c3817d31f4da987afbdaf4a24d7"/> <FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/RUS/Procs/ITEM/ICN-RRJ-R-SP7101-0-AA62F-12980-A-001-01.png" Hash="0c4d8c3817d31f4da987afbdaf4a24d7"/>
<FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/RUS/Procs/ITEM/PMC-RRJNEW-AA62F-ITEM0-00_001-00_ru-RU.xml" Hash="68c917f4eacff64054cd9e34da788087"/> <FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/RUS/Procs/ITEM/PMC-RRJNEW-AA62F-ITEM0-00_001-00_ru-RU.xml" Hash="68c917f4eacff64054cd9e34da788087"/>
<FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/RUS/Scens/RRJ-A-00-00-00-00A01-018C-A.xml" Hash="9705fde16e81324ceef61c7d967ff7dd"/> <FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/RUS/Scens/RRJ-A-00-00-00-00A01-018C-A.xml" Hash="9705fde16e81324ceef61c7d967ff7dd"/>
<FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/RUS/Scens/RRJ-N-09-10-00-00A01-040A-A.xml" Hash="5c8399543f7d124aaf971835267c2593"/>
<FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/RUS/Scens/RRJ-N-12-11-28-01A01-012A-A.xml" Hash="fddbf5711cce1c1d101085f3eceeb654"/> <FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/RUS/Scens/RRJ-N-12-11-28-01A01-012A-A.xml" Hash="fddbf5711cce1c1d101085f3eceeb654"/>
<FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/RUS/Scens/RRJ-N-12-11-28-01A01-211A-A.xml" Hash="c7a2e7f8e417d5679fb87d5fa18916a2"/> <FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/RUS/Scens/RRJ-N-12-11-28-01A01-211A-A.xml" Hash="c7a2e7f8e417d5679fb87d5fa18916a2"/>
<FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/RUS/Scens/RRJ-N-17-10-00-01A01-200A-A.xml" Hash="9689671a33ca4f01d4841bf1a63ae191"/> <FileData Path="/Application/RRJLoader/RRJ_Data/StreamingAssets/RUS/Scens/RRJ-N-17-10-00-01A01-200A-A.xml" Hash="9689671a33ca4f01d4841bf1a63ae191"/>

View File

@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?> <?xml version='1.0' encoding='UTF-8'?>
<ServerSettingsContainer> <ServerSettingsContainer>
<ServerSettings Address="192.168.100.83" UseMathModel="1" AutoStart="0" Language="RUS" LocalPortMath="18004" Port="6000" DestPortMath="18003"/> <ServerSettings Port="6000" UseMathModel="1" DestPortMath="18003" LocalPortMath="18004" AutoStart="0" Address="192.168.100.83" Language="RUS"/>
<VersionData Version="BS2" Created="Пт авг 15 09:59:42 2025" isChangable="1"/> <VersionData isChangable="1" Version="BS2" Created="Пт авг 15 09:59:42 2025"/>
</ServerSettingsContainer> </ServerSettingsContainer>

File diff suppressed because it is too large Load Diff

View File

@@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ClientAutorization Login="O1" Password="1111"/> <ClientNotify Code="CANCHANGE"/>

View File

@@ -81,7 +81,6 @@ void CoreManager::binding()
connect(postProcessorSystem,&PostProcessorSystem::sigServerBlocked,this,&CoreManager::serverBlocked,Qt::AutoConnection); connect(postProcessorSystem,&PostProcessorSystem::sigServerBlocked,this,&CoreManager::serverBlocked,Qt::AutoConnection);
connect(postProcessorSystem,&PostProcessorSystem::sigStartCompare,hashComparer,&HashComparer::CompareDeltas,Qt::AutoConnection); // ОПАСНОСТЬ connect(postProcessorSystem,&PostProcessorSystem::sigStartCompare,hashComparer,&HashComparer::CompareDeltas,Qt::AutoConnection); // ОПАСНОСТЬ
connect(postProcessorSystem,&PostProcessorSystem::sigSaveLoginData,this,&CoreManager::checkLoginResult,Qt::AutoConnection); connect(postProcessorSystem,&PostProcessorSystem::sigSaveLoginData,this,&CoreManager::checkLoginResult,Qt::AutoConnection);
connect(postProcessorSystem,&PostProcessorSystem::sigShowUpdateList,this,&CoreManager::checkUpdateInfo,Qt::AutoConnection);
connect(versionContainer,&VersionContainer::sigSetServerVersion,this,&CoreManager::setServerVersion,Qt::AutoConnection); connect(versionContainer,&VersionContainer::sigSetServerVersion,this,&CoreManager::setServerVersion,Qt::AutoConnection);
@@ -103,8 +102,6 @@ void CoreManager::binding()
connect(sendSystem,&SendSystem::sigSend,this,&CoreManager::calcUpdateProgress,Qt::AutoConnection); connect(sendSystem,&SendSystem::sigSend,this,&CoreManager::calcUpdateProgress,Qt::AutoConnection);
connect(sendSystem,&SendSystem::sigGetXmlAnswer,dataParserOutput,&DataParserOutput::xmlAnswer_notify,Qt::DirectConnection);//ОПАСНОСТЬ connect(sendSystem,&SendSystem::sigGetXmlAnswer,dataParserOutput,&DataParserOutput::xmlAnswer_notify,Qt::DirectConnection);//ОПАСНОСТЬ
connect(dataParser,&DataParser::sigNotify,widgetManager->getNotifyController(),&NotifyController::showWarning,Qt::AutoConnection);//ОПАСНОСТЬ
connect(dataParser,&DataParser::sigUpdateFilesOnServer,updateController,&UpdateController::updateFilesOnServer,Qt::AutoConnection);//ОПАСНОСТЬ
} }
void CoreManager::initializeSystems() void CoreManager::initializeSystems()