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
@@ -26,7 +26,7 @@ SET(LtsProjectionWorkstation_SRCS
|
||||
)
|
||||
|
||||
IF(BUILD_RTI)
|
||||
NGL_ADD_LIBRARY(WS LtsProjectionWorkstation SHARED ${LtsProjectionWorkstation_SRCS})
|
||||
NGL_ADD_LIBRARY2(WS LtsProjectionWorkstation SHARED ${LtsProjectionWorkstation_SRCS})
|
||||
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(LtsProjectionWorkstation
|
||||
PUBLIC
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
#include <LtsWebSocket/client_message_factory.h>
|
||||
#include <LtsProjectionWorkstation/logger.h>
|
||||
|
||||
#include <LtsProjectionWorkstation/lts_projection_workstation_export.h>
|
||||
#include "ltsprojectionworkstation_export.h"
|
||||
|
||||
namespace LtsProjectionWorkstation
|
||||
{
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
#include <LtsWebSocket/json_keys.h>
|
||||
#include <LtsWebSocket/client_message.h>
|
||||
|
||||
#include <LtsProjectionWorkstation/lts_projection_workstation_export.h>
|
||||
#include "ltsprojectionworkstation_export.h"
|
||||
#include <LtsProjectionWorkstation/vnc_server_manager.h>
|
||||
|
||||
#include <QVector>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
#include "lts_projection_workstation_export.h"
|
||||
#include "ltsprojectionworkstation_export.h"
|
||||
|
||||
namespace LtsProjectionWorkstation
|
||||
{
|
||||
|
||||
+16
-17
@@ -44,7 +44,6 @@ bool LtsProjectionWorkstation::hasInstance()
|
||||
|
||||
LtsProjectionWorkstation::LtsProjectionWorkstation(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_logger(getLogger("LtsProjetionWorkstation"))
|
||||
, m_messageFactory(new MessageFactory(this, m_logger))
|
||||
, m_webSocketServer(new LtsWebSocket::LtsWebSocketServer(m_messageFactory, this))
|
||||
, m_pendingLoginRequest(nullptr)
|
||||
@@ -78,7 +77,7 @@ LoginInformation LtsProjectionWorkstation::pendingLoginRequest()
|
||||
|
||||
LoginInformation result = *m_pendingLoginRequest;
|
||||
|
||||
INFO_LOG(m_logger) << " reset pendingLoginRequest..";
|
||||
INFO_LOG() << " reset pendingLoginRequest..";
|
||||
|
||||
delete m_pendingLoginRequest;
|
||||
m_pendingLoginRequest = nullptr;
|
||||
@@ -91,7 +90,7 @@ void LtsProjectionWorkstation::handleMessage(LtsWebSocket::AbstractClientMessage
|
||||
CTS::LoginRequest *login = dynamic_cast<CTS::LoginRequest *>(message);
|
||||
if (login)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Login request received!"
|
||||
INFO_LOG() << "Login request received!"
|
||||
<< ", login->userId()=" << login->userId()
|
||||
<< " with login->priority()=" << login->priority()
|
||||
<< " ;;; m_lastLoginRequest.m_userId=" << m_lastLoginRequest.m_userId
|
||||
@@ -109,16 +108,16 @@ void LtsProjectionWorkstation::handleMessage(LtsWebSocket::AbstractClientMessage
|
||||
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << "Login request received and DedicatedDisconnect distributed, wait some seconds...";
|
||||
DEBUG_LOG() << "Login request received and DedicatedDisconnect distributed, wait some seconds...";
|
||||
int i=0;
|
||||
while(i<20)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Login request received and DedicatedDisconnect distributed, wait some seconds...i=" << i;
|
||||
DEBUG_LOG() << "Login request received and DedicatedDisconnect distributed, wait some seconds...i=" << i;
|
||||
qApp->processEvents(QEventLoop::AllEvents, 50);
|
||||
QThread::msleep(50);
|
||||
++i;
|
||||
}
|
||||
INFO_LOG(m_logger) << "Login request received and DedicatedDisconnect distributed, wait some seconds... done";
|
||||
INFO_LOG() << "Login request received and DedicatedDisconnect distributed, wait some seconds... done";
|
||||
|
||||
|
||||
login->addReply((new STC::LoginRequestReply(QUuid::createUuid().toString(),
|
||||
@@ -134,10 +133,10 @@ void LtsProjectionWorkstation::handleMessage(LtsWebSocket::AbstractClientMessage
|
||||
|
||||
slotLoginRequestReceived(login->userId(), login->exerciseId());
|
||||
|
||||
INFO_LOG(m_logger) << "Valid login request received -> userId: " << login->userId()
|
||||
INFO_LOG() << "Valid login request received -> userId: " << login->userId()
|
||||
<< " priority: " << login->priority()
|
||||
<< " exerciseId: " << login->exerciseId();
|
||||
DEBUG_LOG(m_logger) << "Logging in now!";
|
||||
DEBUG_LOG() << "Logging in now!";
|
||||
|
||||
}
|
||||
else
|
||||
@@ -148,17 +147,17 @@ void LtsProjectionWorkstation::handleMessage(LtsWebSocket::AbstractClientMessage
|
||||
QVector<VncScreen>())
|
||||
)->toReplyMessage());
|
||||
|
||||
DEBUG_LOG(m_logger) << "Higher prioritized login received -> userId: " << login->userId()
|
||||
DEBUG_LOG() << "Higher prioritized login received -> userId: " << login->userId()
|
||||
<< " priority: " << login->priority()
|
||||
<< " exerciseId: " << login->exerciseId();
|
||||
|
||||
DEBUG_LOG(m_logger) << "Last login data was -> userId: " << m_lastLoginRequest.m_userId
|
||||
DEBUG_LOG() << "Last login data was -> userId: " << m_lastLoginRequest.m_userId
|
||||
<< " priority: " << m_lastLoginRequest.m_priority
|
||||
<< " exerciseId: " << m_lastLoginRequest.m_exerciseId;
|
||||
}
|
||||
}
|
||||
else
|
||||
ERROR_LOG(m_logger) << "invalid login request received -> userId: " << login->userId()
|
||||
ERROR_LOG() << "invalid login request received -> userId: " << login->userId()
|
||||
<< " priority: " << login->priority()
|
||||
<< " exerciseId: " << login->exerciseId();
|
||||
|
||||
@@ -168,7 +167,7 @@ void LtsProjectionWorkstation::handleMessage(LtsWebSocket::AbstractClientMessage
|
||||
CTS::LogoutRequest *logout = dynamic_cast<CTS::LogoutRequest *>(message);
|
||||
if (logout)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Logging out now!";
|
||||
DEBUG_LOG() << "Logging out now!";
|
||||
slotLogoutRequestReceived();
|
||||
return;
|
||||
}
|
||||
@@ -185,7 +184,7 @@ void LtsProjectionWorkstation::handleMessage(LtsWebSocket::AbstractClientMessage
|
||||
|
||||
|
||||
int disconnectingUserId = discon->userId();
|
||||
INFO_LOG(m_logger) << "Disconnecting now! "
|
||||
INFO_LOG() << "Disconnecting now! "
|
||||
<< ", disconnectingUserId=" << disconnectingUserId
|
||||
<< ", m_pendingLoginRequest=" << m_pendingLoginRequest;
|
||||
m_lastLoginRequest = LoginInformation();
|
||||
@@ -195,7 +194,7 @@ void LtsProjectionWorkstation::handleMessage(LtsWebSocket::AbstractClientMessage
|
||||
|
||||
void LtsProjectionWorkstation::slotLoginRequestReceived(int userId, int exerciseId)
|
||||
{
|
||||
INFO_LOG(m_logger) << "slotLoginRequestReceived.."
|
||||
INFO_LOG() << "slotLoginRequestReceived.."
|
||||
<< ", userId=" << userId
|
||||
<< ", exerciseId=" << exerciseId;
|
||||
delete m_pendingLoginRequest;
|
||||
@@ -220,17 +219,17 @@ void LtsProjectionWorkstation::slotLogoffDone()
|
||||
|
||||
void LtsProjectionWorkstation::clientDisconnected(LtsWebSocket::ClientConnection *client)
|
||||
{
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " START"
|
||||
INFO_LOG() << Q_FUNC_INFO << " START"
|
||||
<< ", m_connections.size = " << m_connections.size();
|
||||
|
||||
m_connections.removeOne(client);
|
||||
|
||||
if ( m_connections.size() == 0 && (m_lastLoginRequest.m_userId != 0 || m_lastLoginRequest.m_priority != 0))
|
||||
{
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " reset m_lastLoginRequest";
|
||||
INFO_LOG() << Q_FUNC_INFO << " reset m_lastLoginRequest";
|
||||
m_lastLoginRequest = LoginInformation();
|
||||
}
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " END"
|
||||
INFO_LOG() << Q_FUNC_INFO << " END"
|
||||
<< ", m_connections.size = " << m_connections.size();
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "lts_projection_workstation_export.h"
|
||||
#include "ltsprojectionworkstation_export.h"
|
||||
#include "vnc_server_manager.h"
|
||||
#include "WebSocket/messages.h"
|
||||
#include "logger.h"
|
||||
|
||||
+13
-13
@@ -48,7 +48,7 @@ bool VncServerManager::init(const QList<QScreen *> &screens)
|
||||
|
||||
const auto sortedScreens = sortScreen(screens);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Setup VNCScreens with " << screens.size() << " screens";
|
||||
DEBUG_LOG() << "Setup VNCScreens with " << screens.size() << " screens";
|
||||
|
||||
int count = 1;
|
||||
|
||||
@@ -77,13 +77,13 @@ bool VncServerManager::init(const QList<QScreen *> &screens)
|
||||
count++;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << m_vncScreens.size() << " VNCScreen(s) created - Setup completed.";
|
||||
DEBUG_LOG() << m_vncScreens.size() << " VNCScreen(s) created - Setup completed.";
|
||||
return true;
|
||||
}
|
||||
|
||||
void VncServerManager::startScreens()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Starting " << m_vncScreens.size() << " VNCScreen(s) ... ";
|
||||
DEBUG_LOG() << "Starting " << m_vncScreens.size() << " VNCScreen(s) ... ";
|
||||
for (const VncScreen &s : std::as_const(m_vncScreens))
|
||||
{
|
||||
connect(s.proc, &QProcess::readyReadStandardOutput,
|
||||
@@ -95,16 +95,16 @@ void VncServerManager::startScreens()
|
||||
for (const VncScreen &s : std::as_const(m_vncScreens))
|
||||
{
|
||||
if (!s.proc->waitForStarted(2000))
|
||||
ERROR_LOG(m_logger) << "Can not start process '" << s.proc->program() << "': "
|
||||
ERROR_LOG() << "Can not start process '" << s.proc->program() << "': "
|
||||
<< s.proc->errorString();
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "Done";
|
||||
DEBUG_LOG() << "Done";
|
||||
}
|
||||
|
||||
|
||||
void VncServerManager::stopScreens()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Stopping " << m_vncScreens.size() << " VNCScreen(s) ...";
|
||||
DEBUG_LOG() << "Stopping " << m_vncScreens.size() << " VNCScreen(s) ...";
|
||||
|
||||
for (const VncScreen &s : std::as_const(m_vncScreens))
|
||||
{
|
||||
@@ -116,28 +116,28 @@ void VncServerManager::stopScreens()
|
||||
if (!s.proc->waitForFinished(2000))
|
||||
s.proc->kill();
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "Done";
|
||||
DEBUG_LOG() << "Done";
|
||||
}
|
||||
|
||||
|
||||
void VncServerManager::killScreens()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Killing all exisiting x11vnc processes ...";
|
||||
DEBUG_LOG() << "Killing all exisiting x11vnc processes ...";
|
||||
|
||||
SingleShotProcess ssp(QStringLiteral("killall x11vnc"));
|
||||
ssp.execute();
|
||||
DEBUG_LOG(m_logger) << "Done";
|
||||
DEBUG_LOG() << "Done";
|
||||
}
|
||||
|
||||
|
||||
void VncServerManager::createPwdFile()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "(Re)creating x11vnc password-file ...";
|
||||
DEBUG_LOG() << "(Re)creating x11vnc password-file ...";
|
||||
|
||||
SingleShotProcess ssp(QStringLiteral("x11vnc -storepasswd ctc11de %1/.vnc/passwd")
|
||||
.arg(QDir::home().absolutePath()));
|
||||
ssp.execute();
|
||||
DEBUG_LOG(m_logger) << "Done";
|
||||
DEBUG_LOG() << "Done";
|
||||
}
|
||||
|
||||
|
||||
@@ -151,7 +151,7 @@ void VncServerManager::slotReadStandardOutput()
|
||||
QRegularExpressionMatch match = QRegularExpression(QStringLiteral("PORT=(.*?)\\s")).match(stdOut);
|
||||
if (!match.hasMatch())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Could not retrieve port information from stdout of " << p->program();
|
||||
WARNING_LOG() << "Could not retrieve port information from stdout of " << p->program();
|
||||
return;
|
||||
}
|
||||
const quint16 port = match.capturedRef(1).toInt();
|
||||
@@ -172,7 +172,7 @@ void VncServerManager::slotErrorOccured()
|
||||
{
|
||||
QProcess *p = qobject_cast<QProcess *>(QObject::sender());
|
||||
if (p)
|
||||
ERROR_LOG(m_logger) << p->errorString();
|
||||
ERROR_LOG() << p->errorString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user