mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJClient.git
synced 2026-03-28 05:25:39 +03:00
bugfix: auto-start init
This commit is contained in:
@@ -95,9 +95,10 @@ ServerSettings *DataParser::getClientSettings()
|
|||||||
return settings;
|
return settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DataParser::xmlParser(const QByteArray& array)
|
bool DataParser::xmlParser(const QByteArray& array)
|
||||||
{
|
{
|
||||||
QXmlStreamReader xmlReader(array);
|
QXmlStreamReader xmlReader(array);
|
||||||
|
bool result = false;
|
||||||
|
|
||||||
xmlReader.readNext();
|
xmlReader.readNext();
|
||||||
|
|
||||||
@@ -135,6 +136,7 @@ void DataParser::xmlParser(const QByteArray& array)
|
|||||||
if (value == "UNCHANGEABLE")
|
if (value == "UNCHANGEABLE")
|
||||||
{
|
{
|
||||||
//версию нельзя изменять
|
//версию нельзя изменять
|
||||||
|
result = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value == "CHANGEABLE")
|
if (value == "CHANGEABLE")
|
||||||
@@ -247,4 +249,5 @@ void DataParser::xmlParser(const QByteArray& array)
|
|||||||
|
|
||||||
xmlReader.readNext();
|
xmlReader.readNext();
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDomDocument>
|
#include <QDomDocument>
|
||||||
#include <QXmlStreamWriter>
|
#include <QXmlStreamWriter>
|
||||||
#include <Data/FileData.h>
|
|
||||||
#include <Data/Datas.h>
|
#include <Data/Datas.h>
|
||||||
#include <Data/FileData.h>
|
#include <Data/FileData.h>
|
||||||
#include <Core/tools.h>
|
#include <Core/tools.h>
|
||||||
@@ -22,7 +21,7 @@ public:
|
|||||||
|
|
||||||
void initialize(PostProcessorSystem *postProcessSystem);
|
void initialize(PostProcessorSystem *postProcessSystem);
|
||||||
ServerSettings* getClientSettings();
|
ServerSettings* getClientSettings();
|
||||||
void xmlParser(const QByteArray& array);
|
bool xmlParser(const QByteArray& array);
|
||||||
private:
|
private:
|
||||||
PostProcessorSystem *postProcessSystem;
|
PostProcessorSystem *postProcessSystem;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -77,7 +77,6 @@ QByteArray DataParserOutput::xmlAnswer(const QList<SXmlAnswerTag>& listTag, cons
|
|||||||
return array;
|
return array;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DataParserOutput::createFileDataList(const QList<FileData>& fileDataList,const QString& filename)
|
void DataParserOutput::createFileDataList(const QList<FileData>& fileDataList,const QString& filename)
|
||||||
{
|
{
|
||||||
QFile file(filename);
|
QFile file(filename);
|
||||||
@@ -129,7 +128,6 @@ void DataParserOutput::createAuthMessage(ClientAutorization *auth)
|
|||||||
void DataParserOutput::createServerSettings(ServerSettings* serverSettings)
|
void DataParserOutput::createServerSettings(ServerSettings* serverSettings)
|
||||||
{
|
{
|
||||||
QFile file(settingsName);
|
QFile file(settingsName);
|
||||||
|
|
||||||
file.open(QIODevice::WriteOnly);
|
file.open(QIODevice::WriteOnly);
|
||||||
|
|
||||||
QXmlStreamWriter xmlWriter(&file);
|
QXmlStreamWriter xmlWriter(&file);
|
||||||
|
|||||||
@@ -38,7 +38,8 @@ void RecognizeSystem::recognize(QTcpSocket *socket)
|
|||||||
stream.startTransaction();
|
stream.startTransaction();
|
||||||
stream >> packetType;
|
stream >> packetType;
|
||||||
|
|
||||||
if(!stream.commitTransaction()){
|
if(!stream.commitTransaction())
|
||||||
|
{
|
||||||
emit sigSendDebugLog(Tools::getTime() + " CLIENT: packetType - FAIL commitTransaction");
|
emit sigSendDebugLog(Tools::getTime() + " CLIENT: packetType - FAIL commitTransaction");
|
||||||
|
|
||||||
if(socket->waitForReadyRead(TCP_READ_TIMEOUT)){
|
if(socket->waitForReadyRead(TCP_READ_TIMEOUT)){
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ public:
|
|||||||
QString Language;
|
QString Language;
|
||||||
QString LocalVersionName;
|
QString LocalVersionName;
|
||||||
StreamingVersionData versionData;
|
StreamingVersionData versionData;
|
||||||
bool isAutoStart;
|
bool isAutoStart = false;
|
||||||
bool mathModelUse;
|
bool mathModelUse;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
QT += core gui
|
QT += core gui
|
||||||
QT += network
|
QT += network
|
||||||
QT += xml
|
QT += xml
|
||||||
|
QT += testlib
|
||||||
|
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||||
|
|
||||||
CONFIG += c++11
|
CONFIG += c++11
|
||||||
|
|
||||||
# The following define makes your compiler emit warnings if you use
|
# The following define makes your compiler emit warnings if you use
|
||||||
# any Qt feature that has been marked deprecated (the exact warnings
|
# any Qt feature that has been marked deprecated (the exact warnings
|
||||||
# depend on your compiler). Please consult the documentation of the
|
# depend on your compiler). Please consult the documentation of the
|
||||||
@@ -85,6 +84,9 @@ FORMS += \
|
|||||||
TRANSLATIONS = QtLanguage_ru.ts\
|
TRANSLATIONS = QtLanguage_ru.ts\
|
||||||
QtLanguage_eng.ts
|
QtLanguage_eng.ts
|
||||||
|
|
||||||
|
#TEMPLATE = subdirs
|
||||||
|
#SUBDIRS += Unit-tests\
|
||||||
|
|
||||||
# Default rules for deployment.
|
# Default rules for deployment.
|
||||||
qnx: target.path = /tmp/$${TARGET}/bin
|
qnx: target.path = /tmp/$${TARGET}/bin
|
||||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||||
|
|||||||
2
StaticData/authData.xml
Normal file
2
StaticData/authData.xml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<AuthData Login="O1" Password="1111" InstructorName="" ClientName="Коровин А.В." AccessType="trainee"/>
|
||||||
8872
StaticData/clientHash.xml
Normal file
8872
StaticData/clientHash.xml
Normal file
File diff suppressed because it is too large
Load Diff
2
StaticData/displayData.xml
Normal file
2
StaticData/displayData.xml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
<DisplayInfo DisplaysID="0;"/>
|
||||||
5
StaticData/settings.xml
Normal file
5
StaticData/settings.xml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
|
<ServerSettingsContainer>
|
||||||
|
<ServerSettings Port="6000" LocalPortMath="18004" AutoStart="0" Language="RUS" DestPortMath="18003" UseMathModel="1" Address="192.168.100.134"/>
|
||||||
|
<VersionData Created="Вт авг 19 11:09:28 2025" isChangable="0" Version="base"/>
|
||||||
|
</ServerSettingsContainer>
|
||||||
8675
StaticData/streamingHash.xml
Normal file
8675
StaticData/streamingHash.xml
Normal file
File diff suppressed because it is too large
Load Diff
2
StaticData/temp.xml
Normal file
2
StaticData/temp.xml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ClientNotify Code="DISABLE"/>
|
||||||
@@ -79,7 +79,7 @@ void CoreManager::binding()
|
|||||||
connect(postProcessorSystem,&PostProcessorSystem::sigCallUpdateList,this,&CoreManager::callUpdateList,Qt::AutoConnection);
|
connect(postProcessorSystem,&PostProcessorSystem::sigCallUpdateList,this,&CoreManager::callUpdateList,Qt::AutoConnection);
|
||||||
connect(postProcessorSystem,&PostProcessorSystem::sigSocketDisabled,this,&CoreManager::lostConnection,Qt::AutoConnection);
|
connect(postProcessorSystem,&PostProcessorSystem::sigSocketDisabled,this,&CoreManager::lostConnection,Qt::AutoConnection);
|
||||||
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(versionContainer,&VersionContainer::sigSetServerVersion,this,&CoreManager::setServerVersion,Qt::AutoConnection);
|
connect(versionContainer,&VersionContainer::sigSetServerVersion,this,&CoreManager::setServerVersion,Qt::AutoConnection);
|
||||||
@@ -93,15 +93,15 @@ void CoreManager::binding()
|
|||||||
connect(hashComparer,&HashComparer::sigCallCheck,this,&CoreManager::checkUpdate);
|
connect(hashComparer,&HashComparer::sigCallCheck,this,&CoreManager::checkUpdate);
|
||||||
connect(hashComparer,&HashComparer::sigHaveDelta,this,&CoreManager::checkUpdateInfo);
|
connect(hashComparer,&HashComparer::sigHaveDelta,this,&CoreManager::checkUpdateInfo);
|
||||||
|
|
||||||
connect(updateController,&UpdateController::sigUpdateComplete,widgetManager,&WidgetManager::setCompeteState,Qt::AutoConnection);//ОПАСНОСТЬ
|
connect(updateController,&UpdateController::sigUpdateComplete,widgetManager,&WidgetManager::setCompeteState,Qt::AutoConnection);
|
||||||
connect(updateController,&UpdateController::sigSendHashInfo,widgetManager->getMainWindow(),&MainWindow::updateInitInformation,Qt::AutoConnection);
|
connect(updateController,&UpdateController::sigSendHashInfo,widgetManager->getMainWindow(),&MainWindow::updateInitInformation,Qt::AutoConnection);
|
||||||
|
|
||||||
connect(client,&TCPClient::sigConnectionState,widgetManager,&WidgetManager::setConnectionState,Qt::AutoConnection);//ОПАСНОСТЬ
|
connect(client,&TCPClient::sigConnectionState,widgetManager,&WidgetManager::setConnectionState,Qt::AutoConnection);
|
||||||
connect(client,&TCPClient::sigServerDisconnect,widgetManager,&WidgetManager::setServerDisconnectState,Qt::AutoConnection);//ОПАСНОСТЬ
|
connect(client,&TCPClient::sigServerDisconnect,widgetManager,&WidgetManager::setServerDisconnectState,Qt::AutoConnection);
|
||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreManager::initializeSystems()
|
void CoreManager::initializeSystems()
|
||||||
@@ -183,6 +183,7 @@ void CoreManager::setLocalVersion()
|
|||||||
version->setIsChangeable(currentSettings->versionData.getIsChangeable());
|
version->setIsChangeable(currentSettings->versionData.getIsChangeable());
|
||||||
|
|
||||||
versionContainer->setLocalVersionData(version);
|
versionContainer->setLocalVersionData(version);
|
||||||
|
widgetManager->getMainWindow()->setClientVersionName(versionContainer->getLocalVersion());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CoreManager::checkLoginResult(ServerAuthorization *auth)
|
void CoreManager::checkLoginResult(ServerAuthorization *auth)
|
||||||
|
|||||||
Reference in New Issue
Block a user