Merge feature/qt6-migration-basis-modules-services into feature/qt6-migration-basis-modules
Resolves 17 conflicts against legacy Qt5 semantics; validates with BUILD_RTI=ON BUILD_GRANTLEE=ON.
This commit is contained in:
1200 files changed
+20421
-18259
No files matched your search
@@ -9,6 +9,14 @@ IF(BUILD_RTI)
|
||||
INCLUDE(MacroRTIDDSGen)
|
||||
INCLUDE(MacroCodeGenIdl)
|
||||
|
||||
# Resolve <DDS/...> includes (generic_data_reader.h, generic_dtc.h, ...) to the
|
||||
# real headers under Lts/DDS/ instead of the migration stub tree in include/.
|
||||
# The generated core_dtc_impl.h relies on GenericDtc::TopicType, which only the
|
||||
# real DDSGeneric::GenericDataReader base provides — the stub variant lacks it.
|
||||
# Same fix the migrated service CMakeLists (FileManagement/FilterManagement)
|
||||
# already enforce; svcFileManagement links svcCoreClient, so Core must build.
|
||||
include_directories(BEFORE ${CMAKE_SOURCE_DIR}/Lts)
|
||||
|
||||
SET(xml_FILE core.xml)
|
||||
|
||||
#
|
||||
@@ -111,13 +119,11 @@ SET(SRCS_client
|
||||
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV WS HLA svcCoreClient SHARED ${SRCS_client})
|
||||
|
||||
# Add compile definition for export macros
|
||||
TARGET_COMPILE_DEFINITIONS(svcCoreClient
|
||||
PRIVATE
|
||||
MAKE_SVCCORECLIENT_LIB
|
||||
)
|
||||
|
||||
# NGL_ADD_LIBRARY2 (unlike NGL_ADD_LIBRARY) does not define the
|
||||
# MAKE_<SYMBOL>_LIB compile guard, but the generated core_[d|f]tc_impl.h
|
||||
# headers require MAKE_SVCCORECLIENT_LIB — same situation as ddscore above,
|
||||
# which defines MAKE_DDSCORE_LIB explicitly for the same reason.
|
||||
TARGET_COMPILE_DEFINITIONS(svcCoreClient PRIVATE MAKE_SVCCORECLIENT_LIB)
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcCoreClient
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../
|
||||
|
||||
@@ -59,9 +59,9 @@ void Pacemaker::addPort(unsigned short number, Core::CorePortType portType, cons
|
||||
|
||||
void Pacemaker::addPortInternal(unsigned short number, Core::CorePortType portType, const QString& properties)
|
||||
{
|
||||
if (!m_state.ports.has_value())
|
||||
if (!m_state.ports.is_set())
|
||||
m_state.ports = std::vector<Core::PortInformation>();
|
||||
m_state.ports.value().push_back(Core::PortInformation(number, portType, properties.toStdString()));
|
||||
m_state.ports.get().push_back(Core::PortInformation(number, portType, properties.toStdString()));
|
||||
|
||||
publishState();
|
||||
}
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
#include <Core/core_export.h>
|
||||
|
||||
#if BUILD_RTI
|
||||
// Resolves to the codegen-generated core_dtc.h via the build-dir include
|
||||
// root (build4/Lts). The old <Core/core_dtc.h> spelling hit the migration
|
||||
// stub tree (include/Core/core_dtc.h), whose DDS::Core::Interface forward
|
||||
// declarations don't match the generated Core::Interface::Dtc.
|
||||
#include <DDS/Core/core_dtc.h>
|
||||
#else
|
||||
// Forward declarations for moc compatibility when BUILD_RTI=OFF
|
||||
@@ -66,7 +70,9 @@ public:
|
||||
template<typename E>
|
||||
bool isLocked(const E &data, int exerciseId)
|
||||
{
|
||||
auto it = m_lockedEntitys.constFind(key(data.id(), exerciseId, QString::fromStdString(typeid(E).name())));
|
||||
// rtiddsgen -stl generates plain public data members, so the id is
|
||||
// accessed directly instead of the old getter call data.id().
|
||||
auto it = m_lockedEntitys.constFind(key(data.id, exerciseId, QString::fromStdString(typeid(E).name())));
|
||||
return !(it == m_lockedEntitys.cend());
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,10 @@ NGL_ADD_LIBRARY2(AAR SV WS HLA ddsconnector SHARED ${SRCS})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(ddsconnector
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../
|
||||
# dds_connector.h includes the generated ddsconnector_export.h with a
|
||||
# quoted include; consumers (svcFilterManagement etc.) resolve it only
|
||||
# if the binary dir with the GENERATE_EXPORT_HEADER output is exported.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(ddsconnector
|
||||
|
||||
@@ -47,7 +47,6 @@ class FunctionTopicTests : public QObject
|
||||
const DdsUnitTests::FunctionRequestWithState& request);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger& m_logger;
|
||||
void requestWithState();
|
||||
|
||||
std::unique_ptr<FTS::FunctionTopicTest> m_fts;
|
||||
|
||||
@@ -430,7 +430,10 @@ private:
|
||||
INFO_LOG(m_logger) << "#receiveReply for " << TopicNameHelper::replyTopicTypeName();
|
||||
// QueuedConnection to make sure the data is handled in the correct Qt (main) thread
|
||||
request.replySlot.invoke(m_objToInform, Qt::QueuedConnection,
|
||||
Q_RETURN_ARG(ReplyTopic, reply.data()),
|
||||
// Qt6: QMetaMethod::invoke takes QMetaMethodArgument; pass the
|
||||
// registered topic type name like Q_ARG does, but with the
|
||||
// runtime name (ReplyTopic is a template parameter).
|
||||
QtPrivate::Invoke::argument<ReplyTopic>(TopicNameHelper::replyTopicTypeName(), reply.data()),
|
||||
Q_ARG(int, request.uniqueId),
|
||||
Q_ARG(bool, !inProgress)); // finished yes/no
|
||||
}
|
||||
|
||||
@@ -31,6 +31,10 @@ NGL_ADD_LIBRARY2(WS AAR SV HLA ddsfts SHARED ${SRCS})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(ddsfts
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../
|
||||
# generic_fts_internal.h includes the generated ddsfts_export.h with a
|
||||
# quoted include; consumers (the generated *_topic_type_plugin.cpp)
|
||||
# resolve it only if the binary dir with the export header is exported.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../../Proxies/TrainingAreaBase
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(ddsfts
|
||||
|
||||
@@ -63,8 +63,12 @@ private:
|
||||
void sendReplyState(Core::FtReplyState replyState, const rti::core::SampleIdentity &requestSampleIdentity)
|
||||
{
|
||||
connext::WriteSample<ReplyTopic> reply;
|
||||
reply.data().replyState(replyState);
|
||||
// rtiddsgen -stl generates plain public data members, so the reply
|
||||
// state is assigned directly instead of the old setter call.
|
||||
reply.data().replyState = replyState;
|
||||
|
||||
// FtReplyState doesn't exist anymore with rtiddsgen 7.7 - the
|
||||
// enum values are directly available in Core::FtReplyState.
|
||||
bool bLastTelegram = ((replyState != Core::FtReplyState::InProgress) &&
|
||||
(replyState != Core::FtReplyState::NotStarted));
|
||||
m_replier->send_reply(reply, requestSampleIdentity, bLastTelegram);
|
||||
@@ -79,7 +83,7 @@ private:
|
||||
template <typename T, typename std::enable_if<HasStatusFunction<T>::value, int>::type = 0>
|
||||
void setReply(T &data, Core::FtReplyState status)
|
||||
{
|
||||
data.replyState(status);
|
||||
data.replyState = status;
|
||||
}
|
||||
|
||||
template <typename T, typename std::enable_if<!HasStatusFunction<T>::value, int>::type = 0>
|
||||
@@ -235,6 +239,9 @@ protected:
|
||||
<< "[s], -> age: " << age
|
||||
<< "[s], data: " << s;
|
||||
ReplyTopic rt;
|
||||
// Generated topic types have plain public data members, so the
|
||||
// error information is assigned directly instead of the old
|
||||
// setter calls.
|
||||
rt.errorString = tr_lts("dds", "Topic %1 was outdated and therefore ignored. Does the client time match the server time?");
|
||||
rt.errorParams = {TopicNameHelper::requestTopicName()};
|
||||
sendReply(request.identity(), rt);
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// Declares the FTS::GenericFts template that generic_fts_impl.h's
|
||||
// GenericFtsImpl derives from. Present in the qt5 original; without it
|
||||
// GenericFts is no known template at the point of derivation.
|
||||
#include "generic_fts.h"
|
||||
#include <ddsfts_export.h>
|
||||
#include "logger.h"
|
||||
|
||||
|
||||
Reference in new issue
Block a user