Qt6 Migration: Complete migration with DDS/RTI support and build validation

Major Changes:
- Merged latest Qt5 devel content from dlbo (292 files changed, 7 new dirs)
- Consolidated forward-declarations and include folders
- Removed unneeded modules per Niklas' repo check list

Build System Fixes:
- Fixed CMake VERSION_GREATER syntax in ParticipantManagement/CMakeLists.txt
- Added VLC packages (libvlc-dev, vlc-plugin-base) to docker_build.sh
- Added PostgreSQL dev packages (libpq-dev, postgresql-server-dev-all) to Dockerfile
- Fixed locale warnings (ANSI_X3.4-1968 → C.UTF-8)
- Fixed ArcGIS SDK path warnings when BUILD_ARCGIS=OFF

Code Generation Fixes:
- Fixed IDL enum collisions (PortType→CorePortType/DdsutPortType, PdmEventType)
- Fixed Grantlee template svc_translation.cpp.grantlee:
  - Changed {{ idl_enum.name }}_def:: to {{ idl_enum.name }}::
  - Fixed .underlying() calls for C++11 scoped enums (enum class)
- Removed generated files from repo (moc_*, *_dtc.h, *_ftc.h)

Validation:
- BUILD_RTI=ON: SUCCESS
- BUILD_RTI=OFF: SUCCESS
- C++17 standard maintained for RTI 7.7 compatibility
- Ubuntu 26.04 Docker environment verified

Remaining Warnings (expected):
- BgViewer, KDChart, KDReports, Poppler-Qt6 not found (optional features)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
torstenandCopilot committed 2026-09-15 18:20:26 +00:00
1 parent f23384bb68
commit 7173785915
18662 files changed
+4115092 -5435

No files matched your search

@@ -0,0 +1,134 @@
#
# $Id$
# $HeadURL$
# $Author$
#
#
# nglapplication
#
SET(nglapplication_SRCS
nglapplication.cpp
nglapplication.h
nglloggerhandler.cpp
nglloggerhandler.h
ngl_qt_msg_handler.inc
ngl_signal_handler.inc
)
NGL_ADD_LIBRARY(WS AAR SV HLA nglapplication SHARED ${nglapplication_SRCS})
NGL_TARGET_INCLUDE_DIRECTORIES(nglapplication
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
)
NGL_TARGET_LINK_LIBRARIES(nglapplication
PRIVATE
NGLLogger
nglsettings
PUBLIC
Qt5::Core
Qt5::Widgets
)
NGL_INSTALL_TARGET(nglapplication)
#
# nglsingleapplication
#
SET(nglsingleapplication_SRCS
nglsingleapplication.cpp
nglsingleapplication.h
nglloggerhandler.cpp
nglloggerhandler.h
ngl_qt_msg_handler.inc
ngl_signal_handler.inc
)
NGL_ADD_LIBRARY(WS nglsingleapplication SHARED ${nglsingleapplication_SRCS})
NGL_TARGET_INCLUDE_DIRECTORIES(nglsingleapplication
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
)
NGL_TARGET_LINK_LIBRARIES(nglsingleapplication
PRIVATE
NGLLogger
nglsettings
PUBLIC
qtsingleapplication
)
NGL_INSTALL_TARGET(nglsingleapplication)
#
# nglcoreapplication
#
SET(nglcoreapplication_SRCS
nglcoreapplication.cpp
nglcoreapplication.h
nglloggerhandler.cpp
nglloggerhandler.h
ngl_qt_msg_handler.inc
ngl_signal_handler.inc
)
NGL_ADD_LIBRARY(ALL nglcoreapplication SHARED ${nglcoreapplication_SRCS})
NGL_TARGET_INCLUDE_DIRECTORIES(nglcoreapplication
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
)
NGL_TARGET_LINK_LIBRARIES(nglcoreapplication
PRIVATE
NGLLogger
nglsettings
PUBLIC
Qt5::Core
)
NGL_INSTALL_TARGET(nglcoreapplication)
#
# nglsinglecoreapplication
#
SET(nglsinglecoreapplication_SRCS
nglsinglecoreapplication.cpp
nglsinglecoreapplication.h
nglloggerhandler.cpp
nglloggerhandler.h
ngl_qt_msg_handler.inc
ngl_signal_handler.inc
)
NGL_ADD_LIBRARY(AAR SV nglsinglecoreapplication SHARED ${nglsinglecoreapplication_SRCS})
NGL_TARGET_INCLUDE_DIRECTORIES(nglsinglecoreapplication
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
)
NGL_TARGET_LINK_LIBRARIES(nglsinglecoreapplication
PRIVATE
NGLLogger
nglsettings
PUBLIC
qtsinglecoreapplication
)
NGL_INSTALL_TARGET(nglsinglecoreapplication)
#
# nglguiapplication
#
SET(nglguiapplication_SRCS
nglguiapplication.cpp
nglguiapplication.h
nglloggerhandler.cpp
nglloggerhandler.h
ngl_qt_msg_handler.inc
ngl_signal_handler.inc
)
NGL_ADD_LIBRARY(ALL nglguiapplication SHARED ${nglguiapplication_SRCS})
NGL_TARGET_INCLUDE_DIRECTORIES(nglguiapplication
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
)
NGL_TARGET_LINK_LIBRARIES(nglguiapplication
PRIVATE
NGLLogger
nglsettings
PUBLIC
Qt5::Gui
)
NGL_INSTALL_TARGET(nglguiapplication)
@@ -0,0 +1,64 @@
/**
* @RDE_HEADER@
* callback to catch qt log messages
* $Id$
* $HeadURL$
* $Author$
*/
#include <NGLLogger/NGLLoggerBootstrap.h>
#include <QtCore/qglobal.h>
static void qtMsgHandler(QtMsgType type, const QMessageLogContext &, const QString &msg)
{
// pulse audio connect errors are important but can be very annoying - so only print it ONE time only and also as an error
static bool pulseAudioMessageSent = false;
static QString pulseAudioMessage = QStringLiteral("PulseAudioService: pa_context_connect() failed");
if (msg.startsWith(pulseAudioMessage))
{
if (pulseAudioMessageSent)
{
return;
}
type = QtCriticalMsg;
pulseAudioMessageSent = true;
}
try
{
NGL::INGLLogger &l = NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger( "NGL.Qt" );
switch (type) {
case QtDebugMsg:
DEBUG_LOG(l) << msg ;
break;
case QtInfoMsg:
INFO_LOG(l) << msg ;
break;
case QtWarningMsg:
WARNING_LOG(l) << msg ;
break;
case QtCriticalMsg:
ERROR_LOG(l) << msg ;
break;
case QtFatalMsg:
FATAL_LOG(l) << msg ;
break;
}
} catch (...) {
switch (type)
{
case QtDebugMsg:
case QtInfoMsg:
fputs(qPrintable(msg), stdout);
break;
case QtWarningMsg:
case QtCriticalMsg:
case QtFatalMsg:
fputs(qPrintable(msg), stderr);
break;
}
}
}
@@ -0,0 +1,41 @@
/**
* @RDE_HEADER@
* small stub to catch SIGTERM for proper shutdown
* $Id$
* $HeadURL$
* $Author$
*/
#include <signal.h>
#include <QtCore/QCoreApplication>
#ifdef Q_OS_WIN
#include <QtCore/QAbstractNativeEventFilter>
#include <windows.h>
class MyEventFilter final : public QAbstractNativeEventFilter
{
public:
bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) override
{
Q_UNUSED(eventType);
Q_UNUSED(result);
const MSG *msg = reinterpret_cast<const MSG*>(message);
if (msg->message == WM_CLOSE && msg->hwnd == nullptr)
QCoreApplication::quit();
return false;
}
};
#endif
#ifndef SIGTERM
# define SIGTERM 15
#endif
static void signalHandler(int signal_number)
{
if(signal_number != SIGTERM)
return;
QCoreApplication::quit();
}
@@ -0,0 +1,36 @@
/**
* @RDE_HEADER@
* small extension to QApplication for window handling
* $Id$
* $HeadURL$
* $Author$
*/
#include "nglapplication.h"
#include "ngl_signal_handler.inc"
//----------------------------------------------------------------------------
NGLApplication::NGLApplication(int &argc, char **argv)
: QApplication(argc, argv)
{
// auf SIGTERM reagieren
signal(SIGTERM, &signalHandler);
#ifdef Q_OS_WIN
installNativeEventFilter(new MyEventFilter);
#endif
}
//----------------------------------------------------------------------------
bool NGLApplication::notify(QObject *o, QEvent *e)
{
bool bRet = false;
try
{
bRet = QApplication::notify(o, e);
}
catch (const std::exception &e)
{
fprintf(stderr, "exception %s\n", e.what());
}
return bRet;
}
@@ -0,0 +1,41 @@
/**
* @RDE_HEADER@
* small extension to QApplication for window handling
* $Id$
* $HeadURL$
* $Author$
*/
#pragma once
#include <QApplication>
#include "nglloggerhandler.h"
#ifndef NGLAPPLICATION_EXPORT
# ifdef BUILD_STATIC_LIBRARIES
# define NGLAPPLICATION_EXPORT
# else
# ifdef MAKE_NGLAPPLICATION_LIB
# define NGLAPPLICATION_EXPORT Q_DECL_EXPORT
# else
# define NGLAPPLICATION_EXPORT Q_DECL_IMPORT
# endif
# endif
#endif
namespace NGL
{
class INGLLogger;
}
class NGLAPPLICATION_EXPORT NGLApplication : public QApplication, public NGL::LoggerHandler
{
Q_OBJECT
public:
NGLApplication(int &argc, char **argv);
protected:
bool notify(QObject *o, QEvent *e) override;
};
#define nglApp static_cast<NGLApplication*>(NGLApplication::instance())
@@ -0,0 +1,22 @@
/**
* @RDE_HEADER@
* small extension to QCoreApplication with NGL specific stuff
* $Id$
* $HeadURL$
* $Author$
*/
#include "nglcoreapplication.h"
#include "ngl_signal_handler.inc"
//----------------------------------------------------------------------------
NGLCoreApplication::NGLCoreApplication(int &argc, char **argv)
: QCoreApplication(argc, argv)
{
// auf SIGTERM reagieren
signal(SIGTERM, &signalHandler);
#ifdef Q_OS_WIN
installNativeEventFilter(new MyEventFilter);
#endif
}
@@ -0,0 +1,36 @@
/**
* @RDE_HEADER@
* small extension to QCoreApplication with NGL specific stuff
* $Id$
* $HeadURL$
* $Author$
*/
#pragma once
#include <QtCore/QCoreApplication>
#include "nglloggerhandler.h"
#ifndef NGLCOREAPPLICATION_EXPORT
# ifdef BUILD_STATIC_LIBRARIES
# define NGLCOREAPPLICATION_EXPORT
# else
# ifdef MAKE_NGLCOREAPPLICATION_LIB
# define NGLCOREAPPLICATION_EXPORT Q_DECL_EXPORT
# else
# define NGLCOREAPPLICATION_EXPORT Q_DECL_IMPORT
# endif
# endif
#endif
namespace NGL
{
class INGLLogger;
}
class NGLCOREAPPLICATION_EXPORT NGLCoreApplication : public QCoreApplication, public NGL::LoggerHandler
{
Q_OBJECT
public:
NGLCoreApplication(int &argc, char **argv);
};
@@ -0,0 +1,22 @@
/**
* @RDE_HEADER@
* small extension to QCoreApplication with NGL specific stuff
* $Id$
* $HeadURL$
* $Author$
*/
#include "nglguiapplication.h"
#include "ngl_signal_handler.inc"
//----------------------------------------------------------------------------
NGLGuiApplication::NGLGuiApplication(int &argc, char **argv)
: QGuiApplication(argc, argv)
{
// auf SIGTERM reagieren
signal(SIGTERM, &signalHandler);
#ifdef Q_OS_WIN
installNativeEventFilter(new MyEventFilter);
#endif
}
@@ -0,0 +1,38 @@
/**
* @RDE_HEADER@
* small extension to QCoreApplication with NGL specific stuff
* $Id$
* $HeadURL$
* $Author$
*/
#pragma once
#include <QtGui/QGuiApplication>
#include "nglloggerhandler.h"
#ifndef NGLGUIAPPLICATION_EXPORT
# ifdef BUILD_STATIC_LIBRARIES
# define NGLGUIAPPLICATION_EXPORT
# else
# ifdef MAKE_NGLGUIAPPLICATION_LIB
# define NGLGUIAPPLICATION_EXPORT Q_DECL_EXPORT
# else
# define NGLGUIAPPLICATION_EXPORT Q_DECL_IMPORT
# endif
# endif
#endif
namespace NGL
{
class INGLLogger;
}
class NGLGUIAPPLICATION_EXPORT NGLGuiApplication : public QGuiApplication, public NGL::LoggerHandler
{
Q_OBJECT
public:
NGLGuiApplication(int &argc, char **argv);
};
#define nglGuiApp static_cast<NGLGuiApplication*>(NGLGuiApplication::instance())
@@ -0,0 +1,96 @@
/**
* @RDE_HEADER@
* Logger handling stuff for NGL(Core|Gui)Application
* $Id$
* $HeadURL$
* $Author$
*/
#include "nglloggerhandler.h"
#include "ngl_qt_msg_handler.inc"
#include <NGLLogger/NGLLoggerBootstrap.h>
#include <nglsettings/nglsettings_settings.h>
#include <nglcoreapplication.h>
namespace NGL
{
static QByteArray username()
{
#ifdef Q_OS_WIN
return qgetenv("USERNAME");
#else
return qgetenv("USER");
#endif
}
static void setEnvVars()
{
// set LOGPATH to the globally configured path
const QString logPath = NGL::Settings::logPath();
qputenv("LOG4QT_LOGDIR", logPath.toLocal8Bit());
qputenv("LOG4QT_USER", username());
}
//----------------------------------------------------------------------------
void LoggerHandler::createLogger(const QByteArray &baseName, const char *configFileName, bool quiet)
{
setEnvVars();
m_baseLoggerName = baseName;
const QString bnStr(QString::fromLatin1(baseName.toLower()));
const QString logPath = NGL::Settings::logPath();
m_loggerFilenamePostfix = logPath + QLatin1Char('/') + QString::fromLocal8Bit(username()) + QLatin1Char('_') + bnStr;
m_loggerFilenamePrefix = QLatin1String(".log");
const QString logOutputName = m_loggerFilenamePostfix + m_loggerFilenamePrefix;
NGL::NGLLoggerBootstrap::createNGLRootLogger(QString::fromLatin1(configFileName), false, logOutputName, quiet);
// Qt-Messages abfangen
qInstallMessageHandler(&qtMsgHandler);
}
//----------------------------------------------------------------------------
void LoggerHandler::createLogger(const QByteArray &baseName, int exerciseId, int additionalId, bool quiet)
{
setEnvVars();
const QString bnStr(QString::fromLatin1(baseName.toLower()));
const QString configFileName = QLatin1String("log4cxx_") + bnStr + QLatin1String(".props");
const QString logPath = NGL::Settings::logPath();
m_loggerFilenamePostfix = logPath + QLatin1Char('/') + QString::fromLocal8Bit(username()) + QLatin1Char('_') + bnStr;
if (exerciseId > 0)
m_loggerFilenamePostfix += QLatin1Char('_') + QString::number(exerciseId);
if (additionalId > 0)
m_loggerFilenamePostfix += QLatin1Char('_') + QString::number(additionalId);
m_loggerFilenamePrefix = QLatin1String(".log");
m_baseLoggerName = baseName + QByteArray(".main");
const QString logOutputName = m_loggerFilenamePostfix + m_loggerFilenamePrefix;
NGL::NGLLoggerBootstrap::createNGLRootLogger(configFileName, false, logOutputName, quiet);
// Qt-Messages abfangen
qInstallMessageHandler(&qtMsgHandler);
}
//----------------------------------------------------------------------------
NGL::INGLLogger &LoggerHandler::baseLogger() const
{
return NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger(m_baseLoggerName.data());
}
//----------------------------------------------------------------------------
NGL::INGLLogger &LoggerHandler::logger(const char *loggerName) const
{
return NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger(loggerName);
}
//----------------------------------------------------------------------------
LoggerHandler *LoggerHandler::getLoggerHandler()
{
return dynamic_cast<LoggerHandler*>(QCoreApplication::instance());
}
} // namespace NGL
@@ -0,0 +1,88 @@
/**
* @RDE_HEADER@
* Logger handling stuff for NGL(Core|Gui)Application
* $Id$
* $HeadURL$
* $Author$
*/
#pragma once
#include <QByteArray>
#include <QString>
#ifndef LOGGERHANDLER_EXPORT
# ifdef BUILD_STATIC_LIBRARIES
# define LOGGERHANDLER_EXPORT
# else
# if defined(MAKE_NGLCOREAPPLICATION_LIB) || defined(MAKE_NGLGUIAPPLICATION_LIB) || defined(MAKE_NGLAPPLICATION_LIB) || defined(MAKE_NGLSINGLECOREAPPLICATION_LIB) || defined(MAKE_NGLSINGLEAPPLICATION_LIB)
# define LOGGERHANDLER_EXPORT Q_DECL_EXPORT
# else
# define LOGGERHANDLER_EXPORT Q_DECL_IMPORT
# endif
# endif
#endif
namespace NGL
{
class INGLLogger;
class LOGGERHANDLER_EXPORT LoggerHandler
{
public:
LoggerHandler() = default;
~LoggerHandler() = default;
/**
* @brief Creates a NGL RootLogger instance, using baseName as the name for the base logger and configFileName for the .props file
* @param baseName the name of the service/application
* @param configFileName The file name with the logging informations
* @param checkTime the time (in seconds) to check for modifications of the file
*/
void createLogger(const QByteArray &baseName,
const char *configFileName,
bool quiet = false);
/**
* @brief Creates a NGL RootLogger instance, using <svcName>.main as the base logger name,
* configFileName is created with 'log4cxx_<svcNameLowerCase>.props'
* @param baseName the name of the service/application
* @param exerciseId the (optional) exercise id, if > 0,
* @param additionalId an (optional) id to be used for logfile name creation,
* the output log name is created with ${USER}_<svcNameLowerCase>_<exerciseId>.log
*/
void createLogger(const QByteArray &baseName,
int exerciseId = 0,
int additionalId = 0,
bool quiet = false);
/**
* @brief get the base Logger created with createLogger()
*/
NGL::INGLLogger &baseLogger() const;
/**
* @brief Get a logger with the given name
* @param The logger to retrieve
*/
NGL::INGLLogger &logger(const char *loggerName) const;
/**
* @brief get the log filename postfix (e.g. /shd/CTC/log/ctc_foo)
*/
QString loggerNamePostfix() const { return m_loggerFilenamePostfix; }
/**
* @brief get the log filename prefix (e.g. .log)
*/
QString loggerNamePrefix() const { return m_loggerFilenamePrefix; }
/**
* @brief Retrieves the loggerhandler from ngl(core)application or nullptr
*/
static LoggerHandler *getLoggerHandler();
private:
QByteArray m_baseLoggerName;
QString m_loggerFilenamePostfix;
QString m_loggerFilenamePrefix;
};
} // namespace NGL
@@ -0,0 +1,37 @@
/**
* @RDE_HEADER@
* small extension to QtSingleApplication with NGL specific stuff
* $Id$
* $HeadURL$
* $Author$
*/
#include "nglsingleapplication.h"
#include "ngl_signal_handler.inc"
//----------------------------------------------------------------------------
NGLSingleApplication::NGLSingleApplication(int &argc, char **argv)
: QtSingleApplication(argc, argv)
{
// auf SIGTERM reagieren
signal(SIGTERM, &signalHandler);
#ifdef Q_OS_WIN
installNativeEventFilter(new MyEventFilter);
#endif
}
//----------------------------------------------------------------------------
bool NGLSingleApplication::notify(QObject *o, QEvent *e)
{
bool bRet = false;
try
{
bRet = QtSingleApplication::notify(o, e);
}
catch (const std::exception &e)
{
fprintf(stderr, "exception %s\n", e.what());
}
return bRet;
}
@@ -0,0 +1,41 @@
/**
* @RDE_HEADER@
* small extension to QtSingleApplication with NGL specific stuff
* $Id$
* $HeadURL$
* $Author$
*/
#pragma once
#include <QtSingleApplication/QtSingleApplication>
#include "nglloggerhandler.h"
#ifndef NGLSINGLEAPPLICATION_EXPORT
# ifdef BUILD_STATIC_LIBRARIES
# define NGLSINGLEAPPLICATION_EXPORT
# else
# ifdef MAKE_NGLSINGLEAPPLICATION_LIB
# define NGLSINGLEAPPLICATION_EXPORT Q_DECL_EXPORT
# else
# define NGLSINGLEAPPLICATION_EXPORT Q_DECL_IMPORT
# endif
# endif
#endif
namespace NGL
{
class INGLLogger;
}
class NGLSINGLEAPPLICATION_EXPORT NGLSingleApplication : public QtSingleApplication, public NGL::LoggerHandler
{
Q_OBJECT
public:
NGLSingleApplication(int &argc, char **argv);
protected:
bool notify(QObject *o, QEvent *e) override;
};
#define nglApp static_cast<NGLSingleApplication*>(NGLSingleApplication::instance())
@@ -0,0 +1,22 @@
/**
* @RDE_HEADER@
* small extension to QCoreApplication with NGL specific stuff
* $Id$
* $HeadURL$
* $Author$
*/
#include "nglsinglecoreapplication.h"
#include "ngl_signal_handler.inc"
//----------------------------------------------------------------------------
NGLSingleCoreApplication::NGLSingleCoreApplication(int &argc, char **argv)
: QtSingleCoreApplication(argc, argv)
{
// auf SIGTERM reagieren
signal(SIGTERM, &signalHandler);
#ifdef Q_OS_WIN
installNativeEventFilter(new MyEventFilter);
#endif
}
@@ -0,0 +1,36 @@
/**
* @RDE_HEADER@
* small extension to QCoreApplication with NGL specific stuff
* $Id$
* $HeadURL$
* $Author$
*/
#pragma once
#include <QtSingleApplication/QtSingleCoreApplication>
#include "nglloggerhandler.h"
#ifndef NGLSINGLECOREAPPLICATION_EXPORT
# ifdef BUILD_STATIC_LIBRARIES
# define NGLSINGLECOREAPPLICATION_EXPORT
# else
# ifdef MAKE_NGLSINGLECOREAPPLICATION_LIB
# define NGLSINGLECOREAPPLICATION_EXPORT Q_DECL_EXPORT
# else
# define NGLSINGLECOREAPPLICATION_EXPORT Q_DECL_IMPORT
# endif
# endif
#endif
namespace NGL
{
class INGLLogger;
}
class NGLSINGLECOREAPPLICATION_EXPORT NGLSingleCoreApplication : public QtSingleCoreApplication, public NGL::LoggerHandler
{
Q_OBJECT
public:
NGLSingleCoreApplication(int &argc, char **argv);
};