допилил ownerWidget в DataBaseLMS

This commit is contained in:
2025-08-19 16:49:45 +03:00
parent b412559483
commit 194b5129b8
7 changed files with 30 additions and 28 deletions

View File

@@ -6,25 +6,19 @@
#include "interfacedatabaselms.h"
InterfaceDataBaseLMS::InterfaceDataBaseLMS(QWidget *ownerWidget, QObject *parent):
QObject(parent),
DataBaseLMS(ownerWidget),
//QObject(parent),
DataBaseLMS(ownerWidget, parent),
ownerWidget(ownerWidget)
{
}
void InterfaceDataBaseLMS::slot_LanguageChanged(QString language)
{
qtLanguageTranslator.load(QString(QStringLiteral("translations/DataBaseLMS_")) + language, QStringLiteral("."));
QCoreApplication::installTranslator(&qtLanguageTranslator);
}
bool InterfaceDataBaseLMS::connectionToDB()
{
//QMutexLocker mtxLocker(&mtxAccess);
if(!createConnection())
{
QMessageBox::critical(ownerWidget, dbSettings.dbName, tr("Connection error: ") + db->lastError().text());
QMessageBox::critical(ownerWidget, dbSettings.dbName, tr("Connection error") /*+ db->lastError().text()*/);
return false;
}
else