mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
DocsUpdater в отдельный поток
This commit is contained in:
@@ -59,6 +59,7 @@ ServerLMSWidget::~ServerLMSWidget()
|
||||
delete dataParser;
|
||||
delete processingSystem;
|
||||
delete updateController;
|
||||
delete docsUpdater;
|
||||
delete assetsManager;
|
||||
delete chatSystem;
|
||||
|
||||
@@ -114,6 +115,13 @@ void ServerLMSWidget::slot_ErrorPostgreSQL(QString text)
|
||||
QMessageBox::critical(this, tr("Error PostgreSQL!"),text);
|
||||
}
|
||||
|
||||
void ServerLMSWidget::slot_UpdateDocs()
|
||||
{
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
emit signal_DocsUpdaterUpdate();
|
||||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
||||
void ServerLMSWidget::start()
|
||||
{
|
||||
startInitialization();
|
||||
@@ -190,6 +198,8 @@ void ServerLMSWidget::on_btnSettings_clicked()
|
||||
connect(&dlg, &DialogSettingsTray::signal_LanguageChanged, this, &ServerLMSWidget::slot_LanguageChanged);
|
||||
//connect(&dlg, &DialogSettingsTray::signal_UpdateStyleSheet, this, &ServerLMSWidget::slot_UpdateStyleSheet);
|
||||
|
||||
connect(&dlg, &DialogSettingsTray::signal_UpdateDocs, this, &ServerLMSWidget::slot_UpdateDocs);
|
||||
|
||||
|
||||
switch( dlg.exec() )
|
||||
{
|
||||
@@ -271,6 +281,8 @@ QString ServerLMSWidget::loadStyleSheet()
|
||||
|
||||
void ServerLMSWidget::startInitialization()
|
||||
{
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
|
||||
providerDBLMS = new ProviderDBLMS(this);
|
||||
connect(providerDBLMS, &ProviderDBLMS::signal_ErrorPostgreSQL, this, &ServerLMSWidget::slot_ErrorPostgreSQL);
|
||||
connect(providerDBLMS, &ProviderDBLMS::signal_BlockAutorization, this, &ServerLMSWidget::slot_BlockAutorization);
|
||||
@@ -315,7 +327,9 @@ void ServerLMSWidget::startInitialization()
|
||||
emit sigUpdateController(commonClientHandler,dataParser,assetsManager);
|
||||
|
||||
docsUpdater = new DocsUpdater(updateController, this);
|
||||
docsUpdater->update();
|
||||
connect(this, &ServerLMSWidget::signal_DocsUpdaterUpdate, docsUpdater, &DocsUpdater::slot_update,Qt::DirectConnection);
|
||||
docsUpdater->moveToThread(updateThread);
|
||||
slot_UpdateDocs();
|
||||
|
||||
ui->btnStopServer->setEnabled(false);
|
||||
ui->btnStartServer->setEnabled(true);
|
||||
@@ -323,6 +337,8 @@ void ServerLMSWidget::startInitialization()
|
||||
flStartInitialization = true;
|
||||
|
||||
updateStateServer();
|
||||
|
||||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
||||
void ServerLMSWidget::tryConnectionToDB()
|
||||
|
||||
Reference in New Issue
Block a user