Создание БД из кода. Требуется рефакт.

This commit is contained in:
2025-10-30 14:56:58 +03:00
parent c11871e8f4
commit 0d1d851e3f
16 changed files with 718 additions and 32 deletions

View File

@@ -5,6 +5,7 @@
#include <QSqlDriver> #include <QSqlDriver>
#include <QMessageBox> #include <QMessageBox>
#include <QDomDocument> #include <QDomDocument>
#include <QProcess>
const QString DataBaseLMS::TypeUserDBInstructor = "instructor"; const QString DataBaseLMS::TypeUserDBInstructor = "instructor";
const QString DataBaseLMS::TypeUserDBTrainee = "trainee"; const QString DataBaseLMS::TypeUserDBTrainee = "trainee";
@@ -28,6 +29,225 @@ void DataBaseLMS::slot_LanguageChanged(QString language)
QCoreApplication::installTranslator(&qtLanguageTranslator); QCoreApplication::installTranslator(&qtLanguageTranslator);
} }
bool DataBaseLMS::checkDriverQPSQLavailable()
{
return QSqlDatabase::isDriverAvailable("QPSQL");
}
bool DataBaseLMS::checkUserLMSexist()
{
DataBaseSettings dbSett = getDataBaseSettings();
QSqlDatabase dbCheck = QSqlDatabase::addDatabase("QPSQL");
dbCheck.setUserName("postgres");
dbCheck.setPassword("12345678");
dbCheck.setHostName(dbSett.dbHostName);
dbCheck.setPort(dbSett.dbPort);
if (dbCheck.open())
{
QSqlQuery query = QSqlQuery(dbCheck);
query.prepare("SELECT 1 FROM pg_roles WHERE rolname = :username");
query.bindValue(":username", dbSett.dbUserName);
if (query.exec() && query.next())
{
qDebug() << "Пользователь существует.";
return true;
}
else
{
qDebug() << "Пользователь не существует.";
return false;
}
}
else
{
qDebug() << "Ошибка подключения к PostreSQL.";
return false;
}
}
bool DataBaseLMS::checkDataBaseLMSexist()
{
DataBaseSettings dbSett = getDataBaseSettings();
QSqlDatabase dbCheck = QSqlDatabase::addDatabase("QPSQL");
bool flDBexist = false;
dbCheck.setUserName("postgres");
dbCheck.setPassword("12345678");
dbCheck.setHostName(dbSett.dbHostName);
dbCheck.setPort(dbSett.dbPort);
if (dbCheck.open())
{
QString queryStr = QString("SELECT datname FROM pg_database");
QSqlQuery query = QSqlQuery(dbCheck);
if(queryExec(queryStr, &query))
{
while (query.next())
{//Инструктор
QString nameDB = "";
nameDB = query.value(0).toString();
if(nameDB == dbSettings.dbName)
{
flDBexist = true;
break;
}
}
}
}
else
{
qDebug() << "Ошибка подключения к PostreSQL.";
return false;
}
return flDBexist;
}
bool DataBaseLMS::createUser(QString name)
{
DataBaseSettings dbSett = getDataBaseSettings();
QSqlDatabase dbCheck = QSqlDatabase::addDatabase("QPSQL");
dbCheck.setUserName("postgres");
dbCheck.setPassword("12345678");
dbCheck.setHostName(dbSett.dbHostName);
dbCheck.setPort(dbSett.dbPort);
if (dbCheck.open())
{
QString queryStr = QString("CREATE USER %1 WITH ENCRYPTED PASSWORD '%2'").arg(dbSett.dbUserName, dbSett.dbPassword);
QSqlQuery query = QSqlQuery(dbCheck);
if(queryExec(queryStr, &query))
{
qDebug() << "Пользователь создан.";
return true;
}
else
{
qDebug() << "Пользователь не создан.";
return false;
}
}
else
{
qDebug() << "Ошибка подключения к PostreSQL.";
return false;
}
}
bool DataBaseLMS::createDB(QString name)
{
DataBaseSettings dbSett = getDataBaseSettings();
QSqlDatabase dbCheck = QSqlDatabase::addDatabase("QPSQL");
dbCheck.setUserName("postgres");
dbCheck.setPassword("12345678");
dbCheck.setHostName(dbSett.dbHostName);
dbCheck.setPort(dbSett.dbPort);
if (dbCheck.open())
{
//Создание БД
QString queryStr = QString("CREATE DATABASE %1").arg(dbSett.dbName);
QSqlQuery query = QSqlQuery(dbCheck);
if(queryExec(queryStr, &query))
{
qDebug() << "БД создана.";
//Залитие БД
QProcess process;
//QString pgRestorePath = "C:\\restoreDB.bat"; // Замените на актуальный путь
QString pgRestorePath = "restoreDB.bat"; // Замените на актуальный путь
/*
QString dbName = "databaselms2";
QString user = "postgres";
QString backupFile = "C:\\DBLMS_EMPTY_30_09_2025.backup";
QStringList arguments;
arguments << "-d" << dbName;
arguments << "-U" << user;
arguments << backupFile;
*/
process.start("cmd /C " + pgRestorePath);
process.waitForFinished(-1); // Ждать бесконечно, пока процесс не завершится
//Назначение владельца
QString queryStr = QString("ALTER DATABASE %1 OWNER TO %2").arg(dbSett.dbName, dbSett.dbUserName);
QSqlQuery query = QSqlQuery(dbCheck);
if(queryExec(queryStr, &query))
{
}
else
return false;
//return true;
}
else
{
qDebug() << "БД не создана.";
return false;
}
}
else
{
qDebug() << "Ошибка подключения к PostreSQL.";
return false;
}
dbCheck.close();
QSqlDatabase dbCheck2 = QSqlDatabase::addDatabase("QPSQL");
dbCheck2.setUserName("postgres");
dbCheck2.setPassword("12345678");
dbCheck2.setHostName(dbSett.dbHostName);
dbCheck2.setPort(dbSett.dbPort);
dbCheck2.setDatabaseName(dbSett.dbName);
if (dbCheck2.open())
{
QString newOwner = dbSett.dbUserName;
// Получаем список таблиц
QSqlQuery query(dbCheck2);
query.exec("SELECT tablename FROM pg_catalog.pg_tables WHERE schemaname = 'public';");
while (query.next())
{
QString tableName = query.value(0).toString();
QString alterQuery = QString("ALTER TABLE %1 OWNER TO %2;").arg(tableName).arg(newOwner);
qDebug() << "Executing: " << alterQuery;
dbCheck2.exec(alterQuery);
/*
if (dbCheck2.exec(alterQuery))
{
qDebug() << "Error changing owner for table " << tableName << ":" << dbCheck2.lastError().text();
return false;
}*/
}
}
return true;
}
bool DataBaseLMS::createConnection() bool DataBaseLMS::createConnection()
{ {
dbSettings = getDataBaseSettings(); dbSettings = getDataBaseSettings();
@@ -36,34 +256,6 @@ bool DataBaseLMS::createConnection()
db = new QSqlDatabase(QSqlDatabase::addDatabase(dbSettings.dbType, dbSettings.connectionName)); db = new QSqlDatabase(QSqlDatabase::addDatabase(dbSettings.dbType, dbSettings.connectionName));
/*
db->setUserName(dbSettings.dbUserName);
db->setPassword(dbSettings.dbPassword);
//db->setHostName(dbSettings.dbHostName);
//db->setPort(dbSettings.dbPort);
bool res1 = db->open();
//Проверка наличия БД
QString queryStr = QString("SELECT datname FROM pg_database");
QSqlQuery query = QSqlQuery(*db);
bool flExist = false;
if(queryExec(queryStr, &query))
{
while (query.next())
{//Инструктор
QString nameDB = "";
nameDB = query.value(0).toString();
if(nameDB == dbSettings.dbName)
flExist = true;
nameDB = query.value(1).toString();
nameDB = query.value(2).toString();
nameDB = query.value(3).toString();
}
}
*/
db->setDatabaseName(dbSettings.dbName); db->setDatabaseName(dbSettings.dbName);
db->setUserName(dbSettings.dbUserName); db->setUserName(dbSettings.dbUserName);
db->setPassword(dbSettings.dbPassword); db->setPassword(dbSettings.dbPassword);

View File

@@ -39,6 +39,15 @@ public:
static const QString TypeUserDBInstructor; static const QString TypeUserDBInstructor;
static const QString TypeUserDBTrainee; static const QString TypeUserDBTrainee;
public:
//PostgreSQL
bool checkDriverQPSQLavailable();
bool checkUserLMSexist();
bool checkDataBaseLMSexist();
bool createUser(QString name);
bool createDB(QString name);
protected: protected:
//Подключение //Подключение
bool createConnection(); bool createConnection();

View File

@@ -12,6 +12,9 @@ add_library(ServerLMS SHARED
dialogsettingstray.cpp dialogsettingstray.cpp
dialogsettingstray.h dialogsettingstray.h
dialogsettingstray.ui dialogsettingstray.ui
dialogcheckdb.cpp
dialogcheckdb.h
dialogcheckdb.ui
clienthandler.cpp clienthandler.cpp
clienthandler.h clienthandler.h
multithreadserver.cpp multithreadserver.cpp

View File

@@ -16,5 +16,8 @@
<file>resources/icons/stop.png</file> <file>resources/icons/stop.png</file>
<file>resources/icons/settings.png</file> <file>resources/icons/settings.png</file>
<file>resources/icons/circleGray.png</file> <file>resources/icons/circleGray.png</file>
<file>resources/icons/checkDB.png</file>
<file>resources/icons/editorDB.png</file>
<file>resources/icons/procedure.png</file>
</qresource> </qresource>
</RCC> </RCC>

111
ServerLMS/dialogcheckdb.cpp Normal file
View File

@@ -0,0 +1,111 @@
#include <QMessageBox>
#include <QProcess>
#include "dialogcheckdb.h"
#include "ui_dialogcheckdb.h"
DialogCheckDB::DialogCheckDB(ProviderDBLMS* providerDBLMS, QWidget *parent) :
QDialog(parent),
ui(new Ui::DialogCheckDB),
providerDBLMS(providerDBLMS),
resDriver(false),
resUser(false),
resDB(false)
{
ui->setupUi(this);
ui->btnRepare->setEnabled(false);
check();
}
DialogCheckDB::~DialogCheckDB()
{
delete ui;
}
void DialogCheckDB::check()
{
resDriver = false;
resUser = false;
resDB = false;
resDriver = providerDBLMS->checkDriverQPSQLavailable();
if(resDriver)
{
ui->lblDriverRes->setText(tr("Installed"));
ui->lblDriverResIco->setPixmap(QPixmap(QStringLiteral(":/resources/icons/circleGreen.png")));
}
else
{
ui->lblDriverRes->setText(tr("Not installed"));
ui->lblDriverResIco->setPixmap(QPixmap(QStringLiteral(":/resources/icons/circleRed.png")));
}
resUser = providerDBLMS->checkUserLMSexist();
if(resUser)
{
ui->lblUserRes->setText(tr("Exist"));
ui->lblUserResIco->setPixmap(QPixmap(QStringLiteral(":/resources/icons/circleGreen.png")));
}
else
{
ui->lblUserRes->setText(tr("Not exist"));
ui->lblUserResIco->setPixmap(QPixmap(QStringLiteral(":/resources/icons/circleRed.png")));
}
resDB = providerDBLMS->checkDataBaseLMSexist();
if(resDB)
{
ui->lblDBRes->setText(tr("Exist"));
ui->lblDBResIco->setPixmap(QPixmap(QStringLiteral(":/resources/icons/circleGreen.png")));
}
else
{
ui->lblDBRes->setText(tr("Not exist"));
ui->lblDBResIco->setPixmap(QPixmap(QStringLiteral(":/resources/icons/circleRed.png")));
}
if(!resDriver || !resUser || !resDB)
ui->btnRepare->setEnabled(true);
else
ui->btnRepare->setEnabled(false);
}
void DialogCheckDB::on_btnRepare_clicked()
{
if(!resDriver)
{
QMessageBox::warning(this, tr("Warning!"), tr("Install PostgreSQL."));
return;
}
if(!resUser)
{
if(!providerDBLMS->createUser("nameUser"))
{
QMessageBox::critical(this, tr("Error!"), tr("Failed to create user!"));
return;
}
}
if(!resDB)
{
if(!providerDBLMS->createDB("nameDB"))
{
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;
}

37
ServerLMS/dialogcheckdb.h Normal file
View File

@@ -0,0 +1,37 @@
#ifndef DIALOGCHECKDB_H
#define DIALOGCHECKDB_H
#include <QDialog>
#include "providerdblms.h"
namespace Ui {
class DialogCheckDB;
}
class DialogCheckDB : public QDialog
{
Q_OBJECT
public:
explicit DialogCheckDB(ProviderDBLMS* providerDBLMS, QWidget *parent = nullptr);
~DialogCheckDB();
private slots:
void on_btnRepare_clicked();
void on_toolButton_clicked();
private:
void check();
private:
Ui::DialogCheckDB *ui;
ProviderDBLMS* providerDBLMS;
bool resDriver;
bool resUser;
bool resDB;
};
#endif // DIALOGCHECKDB_H

244
ServerLMS/dialogcheckdb.ui Normal file
View File

@@ -0,0 +1,244 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DialogCheckDB</class>
<widget class="QDialog" name="DialogCheckDB">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Database</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout_Main">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_Driver">
<item>
<widget class="QLabel" name="label_Driver">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Driver PostgreSQL</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lblDriverRes">
<property name="text">
<string>...</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lblDriverResIco">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../InstructorsAndTrainees/InstructorsAndTrainees.qrc">:/resources/icons/circleGray.png</pixmap>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_User">
<item>
<widget class="QLabel" name="label_User">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>User</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lblUserRes">
<property name="text">
<string>...</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lblUserResIco">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../InstructorsAndTrainees/InstructorsAndTrainees.qrc">:/resources/icons/circleGray.png</pixmap>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_DB">
<item>
<widget class="QLabel" name="label_DB">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Database</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lblDBRes">
<property name="text">
<string>...</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lblDBResIco">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../InstructorsAndTrainees/InstructorsAndTrainees.qrc">:/resources/icons/circleGray.png</pixmap>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_Ctrl">
<item>
<widget class="QToolButton" name="toolButton">
<property name="minimumSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="text">
<string>...</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="btnRepare">
<property name="minimumSize">
<size>
<width>58</width>
<height>58</height>
</size>
</property>
<property name="text">
<string>Repare</string>
</property>
<property name="icon">
<iconset resource="../InstructorsAndTrainees/InstructorsAndTrainees.qrc">
<normaloff>:/resources/icons/procedure.png</normaloff>:/resources/icons/procedure.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<resources>
<include location="../InstructorsAndTrainees/InstructorsAndTrainees.qrc"/>
</resources>
<connections/>
</ui>

View File

@@ -2,11 +2,13 @@
#include "dialogsettingstray.h" #include "dialogsettingstray.h"
#include "Systems/tools.h" #include "Systems/tools.h"
#include "ui_dialogsettingstray.h" #include "ui_dialogsettingstray.h"
#include "dialogcheckdb.h"
DialogSettingsTray::DialogSettingsTray(QWidget *parent) : DialogSettingsTray::DialogSettingsTray(ProviderDBLMS* providerDBLMS, QWidget *parent) :
QDialog(parent), QDialog(parent),
ui(new Ui::DialogSettingsTray), ui(new Ui::DialogSettingsTray),
settings(nullptr), settings(nullptr),
providerDBLMS(providerDBLMS),
flSettingsServerChanged(false) flSettingsServerChanged(false)
{ {
ui->setupUi(this); ui->setupUi(this);
@@ -226,3 +228,19 @@ void DialogSettingsTray::on_editPassword_textChanged(const QString &arg1)
ui->btnSave->setEnabled(true); ui->btnSave->setEnabled(true);
flSettingsServerChanged = true; flSettingsServerChanged = true;
} }
void DialogSettingsTray::on_btnCheckDB_clicked()
{
DialogCheckDB dlgCheckDB(providerDBLMS, this);
dlgCheckDB.setWindowFlags(dlgCheckDB.windowFlags() & ~Qt::WindowContextHelpButtonHint);
switch( dlgCheckDB.exec() )
{
case QDialog::Accepted:
break;
case QDialog::Rejected:
break;
default:
break;
}
}

View File

@@ -4,6 +4,7 @@
#include <QDialog> #include <QDialog>
#include <QTranslator> #include <QTranslator>
#include <QEvent> #include <QEvent>
#include "providerdblms.h"
class ServerDBSettings{ class ServerDBSettings{
public: public:
@@ -25,7 +26,7 @@ class DialogSettingsTray : public QDialog
Q_OBJECT Q_OBJECT
public: public:
explicit DialogSettingsTray(QWidget *parent = nullptr); explicit DialogSettingsTray(ProviderDBLMS* providerDBLMS, QWidget *parent = nullptr);
~DialogSettingsTray(); ~DialogSettingsTray();
ServerDBSettings getSettings(); ServerDBSettings getSettings();
@@ -55,6 +56,8 @@ private slots:
void on_editPassword_textChanged(const QString &arg1); void on_editPassword_textChanged(const QString &arg1);
void on_btnCheckDB_clicked();
private: private:
bool saveSettings(); bool saveSettings();
@@ -63,6 +66,8 @@ private:
ServerDBSettings *settings; ServerDBSettings *settings;
ProviderDBLMS* providerDBLMS;
bool flSettingsServerChanged; bool flSettingsServerChanged;
}; };

View File

@@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>400</width> <width>400</width>
<height>324</height> <height>427</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@@ -179,6 +179,36 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_Check">
<item>
<widget class="QToolButton" name="btnCheckDB">
<property name="minimumSize">
<size>
<width>58</width>
<height>58</height>
</size>
</property>
<property name="text">
<string>Check DB</string>
</property>
<property name="icon">
<iconset resource="ServerLMS.qrc">
<normaloff>:/resources/icons/checkDB.png</normaloff>:/resources/icons/checkDB.png</iconset>
</property>
<property name="iconSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
</widget>
</item>
</layout>
</item>
</layout> </layout>
</item> </item>
</layout> </layout>
@@ -238,6 +268,7 @@
</widget> </widget>
<resources> <resources>
<include location="../InstructorsAndTrainees/InstructorsAndTrainees.qrc"/> <include location="../InstructorsAndTrainees/InstructorsAndTrainees.qrc"/>
<include location="ServerLMS.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>

View File

@@ -64,6 +64,31 @@ DataBaseSettings ProviderDBLMS::getDBSettings()
return dbLMS->getDataBaseSettings(); return dbLMS->getDataBaseSettings();
} }
bool ProviderDBLMS::checkDriverQPSQLavailable()
{
return dbLMS->checkDriverQPSQLavailable();
}
bool ProviderDBLMS::checkUserLMSexist()
{
return dbLMS->checkUserLMSexist();
}
bool ProviderDBLMS::checkDataBaseLMSexist()
{
return dbLMS->checkDataBaseLMSexist();
}
bool ProviderDBLMS::createUser(QString name)
{
return dbLMS->createUser(name);
}
bool ProviderDBLMS::createDB(QString name)
{
return dbLMS->createDB(name);
}
QString ProviderDBLMS::getMainInstructorName() QString ProviderDBLMS::getMainInstructorName()
{ {
mtxAccess.lock(); mtxAccess.lock();

View File

@@ -80,6 +80,14 @@ public:
bool DBisConnected(); bool DBisConnected();
DataBaseSettings getDBSettings(); DataBaseSettings getDBSettings();
//PostgreSQL
bool checkDriverQPSQLavailable();
bool checkUserLMSexist();
bool checkDataBaseLMSexist();
bool createUser(QString name);
bool createDB(QString name);
private: private:
InterfaceDataBaseLMS* dbLMS; InterfaceDataBaseLMS* dbLMS;
QMutex mtxAccess; QMutex mtxAccess;

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -179,7 +179,7 @@ void ServerLMSWidget::on_btnStopServer_clicked()
void ServerLMSWidget::on_btnSettings_clicked() void ServerLMSWidget::on_btnSettings_clicked()
{ {
DialogSettingsTray dlg(this); DialogSettingsTray dlg(providerDBLMS, this);
dlg.setWindowFlags(dlg.windowFlags() & ~Qt::WindowContextHelpButtonHint); dlg.setWindowFlags(dlg.windowFlags() & ~Qt::WindowContextHelpButtonHint);
connect(&dlg, &DialogSettingsTray::signal_LanguageChanged, this, &ServerLMSWidget::slot_LanguageChanged); connect(&dlg, &DialogSettingsTray::signal_LanguageChanged, this, &ServerLMSWidget::slot_LanguageChanged);