mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
signal_hasError
This commit is contained in:
@@ -393,7 +393,7 @@ void ServerLMSWidget::startInitialization_step0()
|
|||||||
Logger::instance().setLoggingType(LoggingType::WIDGET);
|
Logger::instance().setLoggingType(LoggingType::WIDGET);
|
||||||
Logger::instance().setLogToFile(true);
|
Logger::instance().setLogToFile(true);
|
||||||
|
|
||||||
connect(this,&ServerLMSWidget::sigUpdateControllerInitialize,updateController,&UpdateController::initialize,Qt::DirectConnection);
|
connect(this,&ServerLMSWidget::sigUpdateControllerInitialize,updateController,&UpdateController::initialize/*,Qt::DirectConnection*/);
|
||||||
connect(updateController,&UpdateController::sigInitializeFinished, this,&ServerLMSWidget::slot_startInitialization_step1/*,Qt::DirectConnection*/);
|
connect(updateController,&UpdateController::sigInitializeFinished, this,&ServerLMSWidget::slot_startInitialization_step1/*,Qt::DirectConnection*/);
|
||||||
connect(this,&ServerLMSWidget::sigCalculateFullHash,updateController,&UpdateController::calculateFullHash,Qt::AutoConnection);
|
connect(this,&ServerLMSWidget::sigCalculateFullHash,updateController,&UpdateController::calculateFullHash,Qt::AutoConnection);
|
||||||
connect(updateController,&UpdateController::sigErrorRequired,this,&ServerLMSWidget::setError);
|
connect(updateController,&UpdateController::sigErrorRequired,this,&ServerLMSWidget::setError);
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ signals:
|
|||||||
QTcpSocket* sigGetSocket();
|
QTcpSocket* sigGetSocket();
|
||||||
|
|
||||||
void signal_DocsChanged();
|
void signal_DocsChanged();
|
||||||
|
void signal_hasError(int code);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void slot_LanguageChanged(QString language);
|
void slot_LanguageChanged(QString language);
|
||||||
@@ -114,9 +115,10 @@ public:
|
|||||||
tr("* check Application for the presence of a folder with a build \n"
|
tr("* check Application for the presence of a folder with a build \n"
|
||||||
"* check SharedData for a folder with the base version and the name base");
|
"* check SharedData for a folder with the base version and the name base");
|
||||||
|
|
||||||
SpecMsgBox::CriticalClose(this, textError);
|
SpecMsgBox::CriticalClose(this, textError);
|
||||||
}
|
}
|
||||||
errorCode = code;
|
errorCode = code;
|
||||||
|
emit signal_hasError(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
int hasError() const
|
int hasError() const
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
serverLMSWidget = new ServerLMSWidget(this);
|
serverLMSWidget = new ServerLMSWidget(this);
|
||||||
ui->verticalLayout_Main->addWidget(serverLMSWidget);
|
ui->verticalLayout_Main->addWidget(serverLMSWidget);
|
||||||
|
|
||||||
|
connect(serverLMSWidget, &ServerLMSWidget::signal_hasError, this, &MainWindow::slot_hasError);
|
||||||
|
|
||||||
connect(serverLMSWidget, &ServerLMSWidget::signal_LanguageChanged, this, &MainWindow::slot_LanguageChanged);
|
connect(serverLMSWidget, &ServerLMSWidget::signal_LanguageChanged, this, &MainWindow::slot_LanguageChanged);
|
||||||
connect(serverLMSWidget, &ServerLMSWidget::signal_Tray_ShowMessage, this, &MainWindow::slot_Tray_ShowMessage);
|
connect(serverLMSWidget, &ServerLMSWidget::signal_Tray_ShowMessage, this, &MainWindow::slot_Tray_ShowMessage);
|
||||||
connect(serverLMSWidget, &ServerLMSWidget::signal_Menu_ShowWindow, this, &MainWindow::slot_TrayMenu_ShowWindow);
|
connect(serverLMSWidget, &ServerLMSWidget::signal_Menu_ShowWindow, this, &MainWindow::slot_TrayMenu_ShowWindow);
|
||||||
@@ -172,9 +174,7 @@ void MainWindow::slot_Tray_ShowMessage(QString textMsg, QSystemTrayIcon::Message
|
|||||||
|
|
||||||
void MainWindow::slot_LazyInitialization()
|
void MainWindow::slot_LazyInitialization()
|
||||||
{
|
{
|
||||||
serverLMSWidget->start();
|
serverLMSWidget->start();
|
||||||
|
|
||||||
errorCheck();
|
|
||||||
|
|
||||||
/* Также подключаем сигнал нажатия на иконку к обработчику
|
/* Также подключаем сигнал нажатия на иконку к обработчику
|
||||||
* данного нажатия
|
* данного нажатия
|
||||||
@@ -186,6 +186,11 @@ void MainWindow::slot_LazyInitialization()
|
|||||||
connect(trayIcon, &QSystemTrayIcon::messageClicked, this, &MainWindow::slot_TrayMessageClicked);
|
connect(trayIcon, &QSystemTrayIcon::messageClicked, this, &MainWindow::slot_TrayMessageClicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::slot_hasError(int code)
|
||||||
|
{
|
||||||
|
errorCheck();
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::slot_LanguageChanged(QString language)
|
void MainWindow::slot_LanguageChanged(QString language)
|
||||||
{
|
{
|
||||||
qtLanguageTranslator.load(QString(QStringLiteral("translations/TrayServerLMS_")) + language, QStringLiteral("."));
|
qtLanguageTranslator.load(QString(QStringLiteral("translations/TrayServerLMS_")) + language, QStringLiteral("."));
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ public slots:
|
|||||||
|
|
||||||
//Слот отложенной инициализации
|
//Слот отложенной инициализации
|
||||||
void slot_LazyInitialization();
|
void slot_LazyInitialization();
|
||||||
|
|
||||||
|
void slot_hasError(int code);
|
||||||
private:
|
private:
|
||||||
void exit();
|
void exit();
|
||||||
void errorCheck();
|
void errorCheck();
|
||||||
|
|||||||
Reference in New Issue
Block a user