Settings DB

This commit is contained in:
2026-02-09 16:10:47 +03:00
parent b3aa4d088a
commit 6387b41f9b
9 changed files with 176 additions and 59 deletions

View File

@@ -24,7 +24,13 @@ DialogSettingsTray::DialogSettingsTray(ProviderDBLMS* providerDBLMS, QWidget *pa
#ifndef PROJECT_TYPE_DEBUG
ui->checkLocalhost->setEnabled(false);
ui->btnUpdateDocs->setVisible(false);
#endif
#endif
#ifdef PROJECT_TYPE_DEBUG
ui->editNameDB->setEnabled(true);
ui->editUserName->setEnabled(true);
ui->editPassword->setEnabled(true);
#endif
/* Создаем строку для регулярного выражения */
QString ipRange = "(?:[0-1]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])";
@@ -298,7 +304,7 @@ void DialogSettingsTray::on_checkLocalhost_stateChanged(int arg1)
void DialogSettingsTray::on_btnCheckDB_clicked()
{
//Проверяем, установлен ли PostgreSQL
if(!providerDBLMS->checkDriverQPSQLavailable())
if(!ProviderDBLMS::checkDriverQPSQLavailable())
{
SpecMsgBox::CriticalClose(this, tr("Driver PostgreSQL is not installed!"));
return;
@@ -332,10 +338,11 @@ void DialogSettingsTray::on_btnCheckDB_clicked()
return;
}
if(providerDBLMS->setUserPasswordPostgres(UserNamePostgres, PasswordPostgres))
if(ProviderDBLMS::setUserPasswordPostgres(UserNamePostgres, PasswordPostgres))
{
DialogCheckDB dlgCheckDB(providerDBLMS, this);
dlgCheckDB.setWindowFlags(dlgCheckDB.windowFlags() & ~Qt::WindowContextHelpButtonHint);
dlgCheckDB.initialize();
switch( dlgCheckDB.exec() )
{