Files
Berrux Kana 3f7beb3c7e Qt6 migration: build fixes for Groups 10/11 + missing plugin modules
Continue the Qt5->Qt6 migration so the LTS Projects (Group 10) and LTS
Application (Group 11) compile, link, and ctest runs.

Qt5->Qt6 API migration (resolves removed/deprecated Qt6 APIs) across Lts
Tools and Apps, e.g. QAction->QActionGroup, QAbstractSocket::errorOccurred,
Qt::SkipEmptyParts, QRandomGenerator, QInputDevice::DeviceType,
QRegularExpression, QLatin1Literal->QStringLiteral, and the SampleModel
m_description->description rename.

CMake build fixes:
- CMakeLists.txt: add Lts/Common to CMAKE_AUTOMOC_INCLUDE_DIRECTORIES so moc
  resolves Q_INTERFACES(ProjectPlugin::Plugin) for the migrated Projects.
- cmake/NGLMacros.cmake: NGL_COMPILE_RESOURCES - replace return() (which aborts
  the calling CMakeLists.txt) with an if/else/endif.
- OpApp/THP: guard the ArcGISQt5Hack link with $<IF:$<TARGET_EXISTS:...>> (the
  target is absent when the SituationMap viewer is stubbed); matches
  CentralEffectSimulation.
- LtsSession: prefer the in-tree svcCoreClient target over a FIND_LIBRARY in
  /usr/local/lib.
- CnrProxyTester/DotMatrixDisplay: set AUTOUIC_SEARCH_PATHS for the ui/ subdir.
- TopicDiscover: link NGLLogger.

Export-header visibility stubs (expand the empty *_EXPORT macro to
__attribute__((visibility("default"))); the build sets -fvisibility=hidden and
these stubs shadow the CMake-generated header):
- include/LtsProjectionWorkstation/ltsprojectionworkstation_export.h (fixes
  undefined reference to LtsProjectionWorkstation::getInstance /
  setProjectionOperatorPreset)
- include/LtsSession/ltssession_export.h, include/LtsUtilsGuiDds/ltsutilsguidds_export.h (same pattern)

New plugin modules (copied from legacy) so LtsAppDescriptorChecker finds the
gui:3 IIDs referenced by the Projects' apps.json:
- TakeHomePackageManager/OldTHP              gui:3:tpm.man, gui:3:tpm.usb
- PresentationManagement/.../ScriptEditor   gui:3:pre.script.edit
- Timeline/Gui/EventTimelineClassic         gui:3:tln.view

new_docker_build.sh: correct group targets to the actual CMake target names,
guard LtsReportDisplay on BUILD_CODIFICATION, and skip modules unavailable in
the prebuilt image (AsmWorkstationCertifier/botan2, TrajectoryWidget,
VideoImport, thp_viewer/VLC).
2026-10-05 10:49:34 +02:00

90 lines
2.0 KiB
C++
Executable File

/**
* Initialisation for Publisher
* $Id$
* $HeadURL$
* $Author$
*/
#include "initialisation.h"
#include <NGLLogger/NGLLoggerBootstrap.h>
#include <DDS/DDSConnector/publisher.h>
#include <ExerciseManagement/exm.hpp>
#include <ExerciseManagement/exm_enums.hpp>
#include <ParticipantManagement/ppm.hpp>
#include <QVariant>
#include <QDateTime>
namespace DataSampleGenerator
{
Initialisation::Initialisation(int domainId, int exerciseId)
: DDSConnector::DdsConnector(domainId, IDL::PartitionType::Exercise, exerciseId)
, m_isUsed(0)
, m_participantId(222)
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("DataSampleGenerator.Initialisation"))
{
INFO_LOG(m_logger) << "Initialisation for partition: " << getDefaultPartition();
}
bool Initialisation::init(const QStringList &qosFileList)
{
if (!DDSConnector::DdsConnector::init(qosFileList))
return false;
// Initialisation publisher
initPublisher();
return true;
}
void Initialisation::generateTestData(const QString &type)
{
m_isUsed = !m_isUsed;
if (type == QLatin1String("ExerciseManagement::Exercise"))
{
ExerciseManagement::Exercise data;
data.id = 999;
data.name = "TestExe";
data.isUsed = m_isUsed;
data.partitionName = "Exe999";
data.state = ExerciseManagement::ExerciseState::Started;
data.isDeleted = false;
getPublisher()->write(data);
}
else if (type == QLatin1String("ParticipantManagement::ExerciseParticipant"))
{
ParticipantManagement::Participant data;
data.id = m_participantId;
data.symbol = std::string("231");
//data.relatedUnit(1);
data.equipmentNumber = 1111;
data.isSimulated = true;
data.sampleTime = static_cast<int64_t>(QDateTime::currentMSecsSinceEpoch());
//data.isNBCProtectionActivated(false);
getPublisher()->write(data);
data.id = m_participantId+10;
getPublisher()->write(data);
}
else
{
WARNING_LOG(m_logger) << "TopicType " << type << " not implemented.";
}
}
} // Namespace DataSampleGenerator