mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
Рефакт Администрирование БД 1
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user