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
{
Q_OBJECT
public:
explicit UpdateController(QObject *parent = 0);
~UpdateController();
void initialize(VersionContainer *versionContainer,DataParserOutput *dataParser, SendSystem *sendSystem);
void calculateCommonHash();
void calculateStreamingHash();
~UpdateController();
void updateFilesOnServer(QList<FileData> *fileSendList);
void checkCanUpdate();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -167,35 +167,6 @@ void SendSystem::sendFinish()
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)
{
QDataStream stream(socket);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,2 +1,2 @@
<?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/indOld.packet" Hash="1425cfadb547a04c6299697fc04174b7"/>
<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/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"/>
@@ -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/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-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-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"/>

View File

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

File diff suppressed because it is too large Load Diff

View File

@@ -1,2 +1,2 @@
<?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::sigStartCompare,hashComparer,&HashComparer::CompareDeltas,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);
@@ -103,8 +102,6 @@ void CoreManager::binding()
connect(sendSystem,&SendSystem::sigSend,this,&CoreManager::calcUpdateProgress,Qt::AutoConnection);
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()