mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
errorCheck переделал
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#include <QMessageBox>
|
||||
#include <QTimer>
|
||||
#include <QThread>
|
||||
#include <QMenu>
|
||||
#include "specialmessagebox.h"
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
|
||||
@@ -18,17 +20,11 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
ui->setupUi(this);
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowMinimizeButtonHint);
|
||||
|
||||
//Скрываем ненужные элементы окна
|
||||
ui->menubar->setVisible(false);
|
||||
ui->statusbar->setVisible(false);
|
||||
|
||||
serverLMSWidget = new ServerLMSWidget(this);
|
||||
|
||||
ui->verticalLayout_Main->addWidget(serverLMSWidget);
|
||||
|
||||
connect(serverLMSWidget, &ServerLMSWidget::signal_LanguageChanged, this, &MainWindow::slot_LanguageChanged);
|
||||
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_HideWindow, this, &MainWindow::slot_TrayMenu_HideWindow);
|
||||
|
||||
@@ -205,24 +201,10 @@ void MainWindow::errorCheck()
|
||||
{
|
||||
if(serverLMSWidget->hasError() == 100)
|
||||
{
|
||||
slot_TrayMenu_ShowWindow();
|
||||
slot_TrayMenu_ShowWindow();
|
||||
|
||||
QMessageBox msgBox(this);
|
||||
|
||||
msgBox.setWindowTitle(tr("Error!"));
|
||||
msgBox.setIcon(QMessageBox::Critical);
|
||||
msgBox.setText(tr("No Client files found!"));
|
||||
msgBox.setInformativeText(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"));
|
||||
msgBox.setStandardButtons(QMessageBox::Close);
|
||||
msgBox.show();
|
||||
int ret = msgBox.exec();
|
||||
|
||||
if (ret == QMessageBox::Close)
|
||||
{
|
||||
//выключение с задержкой, так как eventLoop инициализируется позже
|
||||
QTimer::singleShot(1000,this,&MainWindow::slot_TrayMenu_Exit);
|
||||
}
|
||||
//выключение с задержкой, так как eventLoop инициализируется позже
|
||||
QTimer::singleShot(1000,this,&MainWindow::slot_TrayMenu_Exit);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user