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

This commit is contained in:
2025-11-05 12:36:11 +03:00
parent e9363c388b
commit 84ea6ca512
8 changed files with 102 additions and 54 deletions

View File

@@ -77,13 +77,13 @@ void DialogCheckDB::on_btnRepare_clicked()
{
if(!resDriver)
{
QMessageBox::warning(this, tr("Warning!"), tr("Install PostgreSQL."));
QMessageBox::critical(this, tr("Error!"), tr("Install PostgreSQL."));
return;
}
if(!resUser)
{
if(!providerDBLMS->createUser("nameUser"))
if(!providerDBLMS->createUser())
{
QMessageBox::critical(this, tr("Error!"), tr("Failed to create user!"));
return;
@@ -92,22 +92,10 @@ void DialogCheckDB::on_btnRepare_clicked()
if(!resDB)
{
if(!providerDBLMS->createDB("nameDB"))
if(!providerDBLMS->createDB())
{
QMessageBox::critical(this, tr("Error!"), tr("Failed to create Database!"));
return;
}
}
}
void DialogCheckDB::on_toolButton_clicked()
{
QProcess process;
QString program = "cmd.exe";
QStringList arguments;
arguments << "/C" << "echo Hello from QProcess" << "&&" << "pause";
process.start(program, arguments);
process.waitForFinished();
int i = 0;
}