Qt6 Migration: DDS-Stubs, Logger-Fixes, Export-Header Korrekturen
- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung - 44 Export-Header Include-Pfade korrigiert (_export.h) - 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h) - INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros - Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits) - FATAL_LOG Makro hinzugefügt - InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h) - FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h) - AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp) - SymbolAppearance Klasse vollständig definiert mit content() Methode - BuildingComponentFilter Klasse definiert mit Copy-Konstruktor - Ftc Factory: nullptr Return (abstract class) - AesFilter Klasse in aes.hpp hinzugefügt - Dtc Klasse in ppm.hpp mit participantChanged Signal - AesType Enum: alle 15 At* Werte definiert - AesEffectState_def: EsReceived hinzugefügt - DataModification Enum: eAdded/eModified/eRemoved - function_reply_object.h → core_types.h Include-Pfad (72 Dateien) - Enum-Class-Streaming Template-Operator in INGLLogger.h - ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen - ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge - QRegExp → QRegularExpression in tpm_js_parser.cpp - .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert - Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2785 files changed
+18754
-18316
No files matched your search
+25
-26
@@ -42,7 +42,6 @@ HandlerPdfDownload::HandlerPdfDownload(MainHandler *mainHandler, QObject *parent
|
||||
, m_currentPort(NGL::Connections::port(NGL::Connections::eConnection::SCM_WEBSOCKET))
|
||||
, m_currentMode(Mode::PORT_REQUEST)
|
||||
, m_downloader(nullptr)
|
||||
, m_logger(getLogger("HandlerPdfDownload"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -53,7 +52,7 @@ HandlerPdfDownload::~HandlerPdfDownload()
|
||||
|
||||
bool HandlerPdfDownload::init()
|
||||
{
|
||||
INFO_LOG(m_logger) << "HandlerPdfDownload initialised!";
|
||||
INFO_LOG() << "HandlerPdfDownload initialised!";
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -90,7 +89,7 @@ void HandlerPdfDownload::handleServicePortsInformation(const QVector<WebSocketIn
|
||||
m_webSocket->open(m_hostname, flmPort);
|
||||
else
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Could not connect to FileManagement WebSocket server.";
|
||||
ERROR_LOG() << "Could not connect to FileManagement WebSocket server.";
|
||||
m_currentMode = Mode::PORT_REQUEST;
|
||||
}
|
||||
}
|
||||
@@ -140,7 +139,7 @@ void HandlerPdfDownload::onGetPdfListRequest(const rti::core::SampleIdentity &co
|
||||
void HandlerPdfDownload::onStartPdfDownloadRequest(const rti::core::SampleIdentity &cookie, const StartPdfDownloadRequest &request)
|
||||
{
|
||||
|
||||
ERROR_LOG(m_logger) <<" onOcPdfDownloadRequest START" ;
|
||||
ERROR_LOG() <<" onOcPdfDownloadRequest START" ;
|
||||
m_downloadReply = PdfDownloadReply();
|
||||
m_downloadCookie = cookie;
|
||||
|
||||
@@ -151,13 +150,13 @@ void HandlerPdfDownload::onStartPdfDownloadRequest(const rti::core::SampleIdenti
|
||||
for (int32_t id : request.documentIds())
|
||||
str.append(QString::number(id) + QStringLiteral(" "));
|
||||
|
||||
DEBUG_LOG(m_logger) << str;
|
||||
DEBUG_LOG() << str;
|
||||
}
|
||||
|
||||
if (m_hostname.isEmpty())
|
||||
{
|
||||
QString errorStr = QStringLiteral("Not able to start PDF download. Hostname not set.");
|
||||
ERROR_LOG(m_logger) << errorStr;
|
||||
ERROR_LOG() << errorStr;
|
||||
m_downloadReply.errorString(errorStr.toStdString());
|
||||
m_fts->startPdfDownloadReply(m_downloadCookie, m_downloadReply);
|
||||
return;
|
||||
@@ -201,26 +200,26 @@ void HandlerPdfDownload::onStartPdfDownloadRequest(const rti::core::SampleIdenti
|
||||
|
||||
void HandlerPdfDownload::onOcPdfDownloadRequest(const rti::core::SampleIdentity &cookie, const OcPdfDownloadRequest &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) <<LOGFUNCTION<<" START OcPdfDownloadRequest" ;
|
||||
DEBUG_LOG() <<Q_FUNC_INFO<<" START OcPdfDownloadRequest" ;
|
||||
m_ocPdfDownloadCookie = cookie;
|
||||
m_ocPdfDownloadReply = Core::FunctionReply();
|
||||
|
||||
if(openRemoteDbConnection(QStringLiteral("lts_ets_pro")) == false)
|
||||
{
|
||||
QString errorStr = QStringLiteral("Not able to open remote connection to DB");
|
||||
ERROR_LOG(m_logger) << errorStr;
|
||||
ERROR_LOG() << errorStr;
|
||||
m_ocPdfDownloadReply.errorString(errorStr.toStdString());
|
||||
m_fts->ocPdfDownloadReply(m_ocPdfDownloadCookie, m_ocPdfDownloadReply);
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "Got PDF download request for ids: "<< request.folderId();
|
||||
DEBUG_LOG() << "Got PDF download request for ids: "<< request.folderId();
|
||||
|
||||
m_folderId = request.folderId();
|
||||
if(m_folderId == -1)
|
||||
{
|
||||
QString errorStr = QStringLiteral("Not able to start PDF download. Folder id not valid.");
|
||||
ERROR_LOG(m_logger) << errorStr;
|
||||
ERROR_LOG() << errorStr;
|
||||
m_ocPdfDownloadReply.errorString(errorStr.toStdString());
|
||||
m_fts->ocPdfDownloadReply(m_ocPdfDownloadCookie, m_ocPdfDownloadReply);
|
||||
return;
|
||||
@@ -229,7 +228,7 @@ void HandlerPdfDownload::onOcPdfDownloadRequest(const rti::core::SampleIdentity
|
||||
if (m_hostname.isEmpty())
|
||||
{
|
||||
QString errorStr = QStringLiteral("Not able to start PDF download. Hostname not set.");
|
||||
ERROR_LOG(m_logger) << errorStr;
|
||||
ERROR_LOG() << errorStr;
|
||||
m_ocPdfDownloadReply.errorString(errorStr.toStdString());
|
||||
m_fts->ocPdfDownloadReply(m_ocPdfDownloadCookie, m_ocPdfDownloadReply);
|
||||
return;
|
||||
@@ -256,7 +255,7 @@ void HandlerPdfDownload::exportOcPdfFileContent()
|
||||
|
||||
auto remoteDbIfc = remoteDb->db();
|
||||
const QString dir = QStringLiteral("%1/OcPdf/%2/").arg(QDir::tempPath()).arg(m_operatorName);
|
||||
DEBUG_LOG(m_logger)<<" export path: "<<dir;
|
||||
DEBUG_LOG()<<" export path: "<<dir;
|
||||
QDir directory(dir);
|
||||
if(!directory.exists())
|
||||
directory.mkpath(dir);
|
||||
@@ -267,7 +266,7 @@ void HandlerPdfDownload::exportOcPdfFileContent()
|
||||
QString strm = QStringLiteral("Select id from flm.flm_folder WHERE name = '" ) + m_operatorName + QStringLiteral("' and '") +
|
||||
QString::number(m_folderId) + QStringLiteral("' = ANY(path) LIMIT 1;");
|
||||
|
||||
DEBUG_LOG(m_logger) << "folder content ID querry" << strm;
|
||||
DEBUG_LOG() << "folder content ID querry" << strm;
|
||||
|
||||
std::unique_ptr<NSqlQuery> query = std::unique_ptr<NSqlQuery>(new NSqlQuery(remoteDbIfc->database(), m_logger));
|
||||
query->prepare(strm);
|
||||
@@ -322,7 +321,7 @@ void HandlerPdfDownload::exportOcPdfFileContent()
|
||||
|
||||
if(idsList.isEmpty())
|
||||
{
|
||||
WARNING_LOG(m_logger)<< " pdf files outdated! ";
|
||||
WARNING_LOG()<< " pdf files outdated! ";
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -335,7 +334,7 @@ void HandlerPdfDownload::exportOcPdfFileContent()
|
||||
tableName = (QStringLiteral("flm.flm_file_content"));
|
||||
stmt = (QStringLiteral("SELECT id, name, file_status_id, content, last_modified FROM ") + tableName + where);
|
||||
|
||||
DEBUG_LOG(m_logger) << "### statement: " << stmt;
|
||||
DEBUG_LOG() << "### statement: " << stmt;
|
||||
|
||||
query->prepare(stmt);
|
||||
|
||||
@@ -354,7 +353,7 @@ void HandlerPdfDownload::exportOcPdfFileContent()
|
||||
|
||||
if(data.fileStatusId == FileManagement::FileStatus::Deleted)
|
||||
{
|
||||
DEBUG_LOG(m_logger)<< " skip ";
|
||||
DEBUG_LOG()<< " skip ";
|
||||
continue;
|
||||
}
|
||||
dataVec.append(data);
|
||||
@@ -363,7 +362,7 @@ void HandlerPdfDownload::exportOcPdfFileContent()
|
||||
else
|
||||
{
|
||||
const QString errorStr = tr("Not able to export PDF.");
|
||||
ERROR_LOG(m_logger) << errorStr;
|
||||
ERROR_LOG() << errorStr;
|
||||
m_ocPdfDownloadReply.errorString(errorStr.toStdString());
|
||||
return;
|
||||
}
|
||||
@@ -378,7 +377,7 @@ void HandlerPdfDownload::exportOcPdfFileContent()
|
||||
if(fileInfo.exists() && file.remove() == false)
|
||||
{
|
||||
QString err = QStringLiteral("Couldn't replace existing file: ") + data.name;
|
||||
WARNING_LOG(m_logger)<< err;
|
||||
WARNING_LOG()<< err;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -396,7 +395,7 @@ void HandlerPdfDownload::exportOcPdfFileContent()
|
||||
|
||||
bool HandlerPdfDownload::openRemoteDbConnection(const QString &remoteDatabaseName)
|
||||
{
|
||||
DEBUG_LOG(m_logger) <<" Open RemoteDb Connection..." ;
|
||||
DEBUG_LOG() <<" Open RemoteDb Connection..." ;
|
||||
if (m_remoteDbConnection.isValid())
|
||||
closeDb(m_remoteDbConnection);
|
||||
|
||||
@@ -421,10 +420,10 @@ QSqlDatabase HandlerPdfDownload::openDb(const QString &databaseName, bool remote
|
||||
s->databaseDriver(),
|
||||
remote ? m_remoteHostName : s->databaseHostname(),
|
||||
remote ? Settings::remoteDbName() : databaseName);
|
||||
DEBUG_LOG(m_logger) << "Trying to open database " << s->databaseHostname() << ":" << databaseName;
|
||||
DEBUG_LOG() << "Trying to open database " << s->databaseHostname() << ":" << databaseName;
|
||||
if (!dbConnection.isOpen())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error opening database " << s->databaseHostname() << ":" << databaseName;
|
||||
ERROR_LOG() << "Error opening database " << s->databaseHostname() << ":" << databaseName;
|
||||
if (bOk)
|
||||
*bOk = false;
|
||||
}
|
||||
@@ -444,7 +443,7 @@ void HandlerPdfDownload::closeDb(QSqlDatabase &dbConn)
|
||||
|
||||
void HandlerPdfDownload::onConnected()
|
||||
{
|
||||
INFO_LOG(m_logger) << "Connected to WebSocket server";
|
||||
INFO_LOG() << "Connected to WebSocket server";
|
||||
|
||||
switch (m_currentMode)
|
||||
{
|
||||
@@ -459,12 +458,12 @@ void HandlerPdfDownload::onConnected()
|
||||
|
||||
void HandlerPdfDownload::onDisconnected()
|
||||
{
|
||||
INFO_LOG(m_logger) << "Disconnected from server.";
|
||||
INFO_LOG() << "Disconnected from server.";
|
||||
}
|
||||
|
||||
void HandlerPdfDownload::onNewDownloadState(int progress, const QString &msg)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << msg;
|
||||
DEBUG_LOG() << msg;
|
||||
m_downloadReply.replyState(Core::FtReplyState::InProgress);
|
||||
m_downloadReply.progress(progress);
|
||||
m_downloadReply.currentStep(msg.toStdString());
|
||||
@@ -473,7 +472,7 @@ void HandlerPdfDownload::onNewDownloadState(int progress, const QString &msg)
|
||||
|
||||
void HandlerPdfDownload::onAllDownloadsFinished()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Downloads finished";
|
||||
DEBUG_LOG() << "Downloads finished";
|
||||
m_downloadReply.replyState(Core::FtReplyState::Completed);
|
||||
m_downloadReply.currentStep(tr("Downloads finished").toStdString());
|
||||
m_downloadReply.progress(100);
|
||||
@@ -482,7 +481,7 @@ void HandlerPdfDownload::onAllDownloadsFinished()
|
||||
|
||||
void HandlerPdfDownload::openWebSocket()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Opening websocket to: " << m_hostname << ":" << m_currentPort;
|
||||
DEBUG_LOG() << "Opening websocket to: " << m_hostname << ":" << m_currentPort;
|
||||
m_webSocket->open(m_hostname, m_currentPort);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user