Рефакт Администрирование БД 1

This commit is contained in:
2025-11-05 16:17:26 +03:00
parent 84ea6ca512
commit 99d9c6d1e3
8 changed files with 86 additions and 24 deletions

View File

@@ -4,6 +4,7 @@
#include "Systems/tools.h"
#include "ui_dialogsettingstray.h"
#include "dialogcheckdb.h"
#include "dialogauthorizationinstructor.h"
DialogSettingsTray::DialogSettingsTray(ProviderDBLMS* providerDBLMS, QWidget *parent) :
QDialog(parent),
@@ -252,9 +253,33 @@ void DialogSettingsTray::on_btnCheckDB_clicked()
QString UserNamePostgres;
QString PasswordPostgres;
DialogAuthorizationInstructor dlg(this);
dlg.setWindowTitle(tr("Superuser PostgreSQL authorization"));
dlg.setWindowFlags(dlg.windowFlags() & ~Qt::WindowContextHelpButtonHint);
dlg.setStyleSheet(this->styleSheet());
#ifdef PROJECT_TYPE_DEBUG
dlg.setLogin("postgres");
dlg.setPassword("");
#endif
switch( dlg.exec() )
{
case QDialog::Accepted:
{
UserNamePostgres = dlg.getLogin();
PasswordPostgres = dlg.getPassword();
break;
}
case QDialog::Rejected:
return;
default:
return;
}
//Имитация
UserNamePostgres = "postgres";
PasswordPostgres = "12345678";
//UserNamePostgres = "postgres";
//PasswordPostgres = "12345678";
if(providerDBLMS->setUserPasswordPostgres(UserNamePostgres, PasswordPostgres))
{