mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
Рефакт Администрирование БД 1
This commit is contained in:
@@ -71,6 +71,15 @@ else()
|
||||
endif()
|
||||
target_link_libraries(ServerLMS PRIVATE libDataBaseLMS.dll)
|
||||
|
||||
target_include_directories(ServerLMS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../InstructorsAndTrainees)
|
||||
target_include_directories(ServerLMS PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../InstructorsAndTrainees/instructors)
|
||||
if(PROJECT_TYPE_DEBUG)
|
||||
target_link_directories(ServerLMS PUBLIC ${REPO_PATH}/BUILDS/Debug64/InstructorsAndTrainees)
|
||||
else()
|
||||
target_link_directories(ServerLMS PUBLIC ${REPO_PATH}/BUILDS/Release64/InstructorsAndTrainees)
|
||||
endif()
|
||||
target_link_libraries(ServerLMS PRIVATE libInstructorsAndTrainees.dll)
|
||||
|
||||
target_compile_definitions(ServerLMS PRIVATE SERVERLMS_LIBRARY)
|
||||
|
||||
if(PROJECT_TYPE_DEBUG)
|
||||
|
||||
@@ -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