Merge branch 'bugfix-update-diff' into merge-test

# Conflicts:
#	ServerLMS/Systems/tools.h
#	ServerLMS/Systems/updatecontroller.h
This commit is contained in:
semenov
2025-01-20 09:31:15 +03:00
20 changed files with 247 additions and 105 deletions

View File

@@ -11,11 +11,16 @@ ProcessingSystem::ProcessingSystem(ProviderDBLMS* providerDBLMS, UpdateControlle
this->updateController = updateController;
}
void ProcessingSystem::initialize(ServerLMSWidget *server, DataParser *dataParser, CommonClientHandler *commonClientHandler,Logger *logger)
void ProcessingSystem::initialize(ServerLMSWidget *server,
DataParser *dataParser,
CommonClientHandler *commonClientHandler,
Logger *logger,
UpdateController *updateController)
{
this->commonClientServer = commonClientHandler;
this->dataParser = dataParser;
this->server = server;
this->updateController = updateController;
connect(this,&ProcessingSystem::sigAuthChanged,commonClientHandler, &CommonClientHandler::slot_AuthChanged,Qt::AutoConnection);
connect(this,&ProcessingSystem::sigUpdateListClients,server, &ServerLMSWidget::slotUpdateListClients,Qt::AutoConnection);
@@ -296,6 +301,18 @@ void ProcessingSystem::processingClientNotify(ClientHandler *client, ClientNotif
{
client->sendVersionList();
}
else if(clientNotify.Code == commandCanChangeVersion)
{
if (updateController->getCurrentVersion()->getIsChangeable())
{
client->sigSendNotify(commandChangable);
}
else
{
client->sigSendNotify(commandUnchangable);
}
}
}