mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
Прокинул сигнал ошибки SQL на виджет
This commit is contained in:
@@ -94,7 +94,7 @@ DataBaseSettings DataBaseLMS::getDataBaseSettings()
|
||||
QFile file("config/settings.xml");
|
||||
if(!file.open(QIODevice::ReadOnly))
|
||||
{
|
||||
QMessageBox::critical(ownerWidget, tr("Attention!"), tr("The file could not be opened:") + "config/settings.xml");
|
||||
//QMessageBox::critical(ownerWidget, tr("Attention!"), tr("The file could not be opened:") + "config/settings.xml");
|
||||
return settings;
|
||||
}
|
||||
QXmlStreamReader xmlReader(&file);
|
||||
@@ -234,8 +234,18 @@ void DataBaseLMS::messageWarningErrorQuery(QString queryStr, QSqlQuery* query)
|
||||
|
||||
|
||||
//Сообщение об ошибке
|
||||
QMessageBox::warning(ownerWidget, dbSettings.dbName,
|
||||
/*
|
||||
QWidget* owner = ownerWidget;
|
||||
QMessageBox::critical(ownerWidget, tr("Error PostgreSQL!"),
|
||||
//dbSettings.dbName
|
||||
"Error query:\n" + query->lastError().text() + "\n" +
|
||||
"String of query:\n" + queryStr + "\n" +
|
||||
"Executed query:\n" + query->executedQuery());
|
||||
*/
|
||||
|
||||
QString textError = "";
|
||||
textError = "Error query:\n" + query->lastError().text() + "\n" +
|
||||
"String of query:\n" + queryStr + "\n" +
|
||||
"Executed query:\n" + query->executedQuery();
|
||||
emit signal_ErrorPostgreSQL(textError);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user