From fe75f2c6cac50a68f8b3a4fb84cc66cc38bab06c Mon Sep 17 00:00:00 2001 From: krivoshein Date: Tue, 20 Jan 2026 17:11:01 +0300 Subject: [PATCH] refact 2 --- .../instructors/dialogredactorinstructors.cpp | 3 ++- .../trainees/dialogredactortrainees.cpp | 1 + .../trainees/editortrainees.cpp | 2 +- LibServer/settings/dialogsettingstray.cpp | 18 ++++++++++-------- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/LibInstructorsAndTrainees/instructors/dialogredactorinstructors.cpp b/LibInstructorsAndTrainees/instructors/dialogredactorinstructors.cpp index 07dc108..ebcd6b9 100644 --- a/LibInstructorsAndTrainees/instructors/dialogredactorinstructors.cpp +++ b/LibInstructorsAndTrainees/instructors/dialogredactorinstructors.cpp @@ -17,7 +17,8 @@ DialogRedactorInstructors::DialogRedactorInstructors(ConnectorToServer* connecto QHBoxLayout *layout = new QHBoxLayout(this); layout->addWidget(editorInstructors); this->setWindowTitle(tr("Editor of instructors")); - this->setMinimumSize(1400, 700); + this->setMinimumSize(1400, 700); + this->setWindowFlags(windowFlags() & ~Qt::WindowMinimizeButtonHint); //this->setWindowState(Qt::WindowMaximized); this->setModal(true); } diff --git a/LibInstructorsAndTrainees/trainees/dialogredactortrainees.cpp b/LibInstructorsAndTrainees/trainees/dialogredactortrainees.cpp index fccf8de..e544d0f 100644 --- a/LibInstructorsAndTrainees/trainees/dialogredactortrainees.cpp +++ b/LibInstructorsAndTrainees/trainees/dialogredactortrainees.cpp @@ -18,6 +18,7 @@ DialogRedactorTrainees::DialogRedactorTrainees(ConnectorToServer* connectorToSer layout->addWidget(editorTraineesGroups); this->setWindowTitle(tr("Editor of trainees")); this->setMinimumSize(1400, 700); + this->setWindowFlags(windowFlags() & ~Qt::WindowMinimizeButtonHint); //this->setWindowState(Qt::WindowMaximized); this->setModal(true); } diff --git a/LibInstructorsAndTrainees/trainees/editortrainees.cpp b/LibInstructorsAndTrainees/trainees/editortrainees.cpp index e613087..681a667 100644 --- a/LibInstructorsAndTrainees/trainees/editortrainees.cpp +++ b/LibInstructorsAndTrainees/trainees/editortrainees.cpp @@ -11,7 +11,7 @@ EditorTrainees::EditorTrainees(ConnectorToServer* connectorToServer, bool adminM dlgEditTrainee(nullptr), dlgEditGroup(nullptr) { - ui->setupUi(this); + ui->setupUi(this); connect(treeWidget, &QTreeWidget::currentItemChanged, this, &EditorTrainees::on_treeWidgetCurrentItemChanged); diff --git a/LibServer/settings/dialogsettingstray.cpp b/LibServer/settings/dialogsettingstray.cpp index afe0c04..04e1f51 100644 --- a/LibServer/settings/dialogsettingstray.cpp +++ b/LibServer/settings/dialogsettingstray.cpp @@ -23,7 +23,8 @@ DialogSettingsTray::DialogSettingsTray(ProviderDBLMS* providerDBLMS, QWidget *pa #ifndef PROJECT_TYPE_DEBUG ui->checkLocalhost->setEnabled(false); -#endif + ui->btnUpdateDocs->setVisible(false); +#endif /* Создаем строку для регулярного выражения */ QString ipRange = "(?:[0-1]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])"; @@ -333,6 +334,7 @@ void DialogSettingsTray::on_btnCheckDB_clicked() case QDialog::Accepted: ui->btnSave->setEnabled(true); flSettingsServerChanged = true; + on_btnSave_clicked(); break; case QDialog::Rejected: break; @@ -345,17 +347,17 @@ void DialogSettingsTray::on_btnCheckDB_clicked() if(settings->HostName == "localhost") SpecMsgBox::CriticalClose(this, tr("Error connecting to PostgreSQL!") + "\n\n" + tr("Possible reasons:") + "\n" + - tr("superuser PostgreSQL login or password is incorrect;") + "\n" + - tr("port is incorrect;") + "\n" + - tr("PostgreSQL is not installed.") + "- " + tr("superuser PostgreSQL login or password is incorrect;") + "\n" + + "- " + tr("port is incorrect;") + "\n" + + "- " + tr("PostgreSQL is not installed.") ); else SpecMsgBox::CriticalClose(this, tr("Error connecting to PostgreSQL!") + "\n\n" + tr("Possible reasons:") + "\n" + - tr("superuser PostgreSQL login or password is incorrect;") + "\n" + - tr("port is incorrect;") + "\n" + - tr("file 'pg_hba.conf' does not contain an entry for the IP address:") + settings->HostName + ";" + "\n" + - tr("PostgreSQL is not installed.") + "- " + tr("superuser PostgreSQL login or password is incorrect;") + "\n" + + "- " + tr("port is incorrect;") + "\n" + + "- " + tr("file 'pg_hba.conf' does not contain an entry for the IP address:") + settings->HostName + ";" + "\n" + + "- " + tr("PostgreSQL is not installed.") ); return; }