Complete Qt6 migration: full clean build green across groups G1-G12 incl. runtime plugin set
new_docker_build.sh gains Group 12 (212 GUI/Data plugins); fixes LtsUtilsGuiDds visibility (LTO-stripped exports), LtsProjectionWorkstation unity name shadow, 6 unity-off dirs (dup file-scope statics, ddsftc INTERFACE sources) and reconfigures BUILD_FILTERMANAGEMENT/BUILD_PLUGINS_SERVICEMONITOR=ON
This commit is contained in:
1 parent
eb1d949edc
commit
815e16368e
1718 files changed
+126739
-18495
No files matched your search
+6
-6
@@ -80,7 +80,7 @@ void HandlerTargetInformation::onModifyTargetInformationRequest(const rti::core:
|
||||
Core::FunctionReplyObject HandlerTargetInformation::targetInformationModifyRequest(const ModifyTargetInformationRequest &request)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
const int requestId = request.targetInfo().id();
|
||||
const int requestId = request.targetInfo.id;
|
||||
// modify
|
||||
if (requestId > 0)
|
||||
{
|
||||
@@ -88,12 +88,12 @@ Core::FunctionReplyObject HandlerTargetInformation::targetInformationModifyReque
|
||||
if (!ifs)
|
||||
return Core::FunctionReplyObject(requestId, tr_lts("dds", "TargetInformation with id %1 not found")).arg(requestId);
|
||||
|
||||
auto ret = ifs->updateObject(request.targetInfo());
|
||||
auto ret = ifs->updateObject(request.targetInfo);
|
||||
return ret;
|
||||
}
|
||||
// create
|
||||
ObjectTargetInformation *ifs(new ObjectTargetInformation(m_mainHandler));
|
||||
auto ret = ifs->createObject(request.targetInfo());
|
||||
auto ret = ifs->createObject(request.targetInfo);
|
||||
if (ret.error())
|
||||
{
|
||||
delete ifs;
|
||||
@@ -112,11 +112,11 @@ void HandlerTargetInformation::onRemoveTargetInformationRequest(const rti::core:
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " request=" << request;
|
||||
|
||||
Core::FunctionReplyObject ret;
|
||||
ObjectTargetInformation *ifs = m_objectMap.value(request.id());
|
||||
ObjectTargetInformation *ifs = m_objectMap.value(request.id);
|
||||
|
||||
if (ifs == nullptr)
|
||||
{
|
||||
ret = Core::FunctionReplyObject(request.id(), tr_lts("dds", "ShootbackTarget with id %1 not found")).arg(request.id());
|
||||
ret = Core::FunctionReplyObject(request.id, tr_lts("dds", "ShootbackTarget with id %1 not found")).arg(request.id);
|
||||
m_mainHandler->fts()->removeTargetInformationReply(cookie, ret);
|
||||
return;
|
||||
}
|
||||
@@ -128,7 +128,7 @@ void HandlerTargetInformation::onRemoveTargetInformationRequest(const rti::core:
|
||||
{
|
||||
// delete Object
|
||||
delete ifs;
|
||||
m_objectMap.remove(request.id());
|
||||
m_objectMap.remove(request.id);
|
||||
}
|
||||
|
||||
m_mainHandler->fts()->removeTargetInformationReply(cookie, ret);
|
||||
|
||||
+46
-46
@@ -25,19 +25,19 @@ Core::GeoPosition2D posFromJson(const QJsonValue &val)
|
||||
Core::GeoPosition2D element;
|
||||
{
|
||||
const QJsonValue valLon(objElement.value(QStringLiteral("lon")));
|
||||
element.lon(valLon.toDouble());
|
||||
element.lon = valLon.toDouble();
|
||||
}
|
||||
{
|
||||
const QJsonValue valLat(objElement.value(QStringLiteral("lat")));
|
||||
element.lat(valLat.toDouble());
|
||||
element.lat = valLat.toDouble();
|
||||
}
|
||||
return element;
|
||||
}
|
||||
QJsonObject toJson(const Core::GeoPosition2D &element)
|
||||
{
|
||||
QJsonObject obj;
|
||||
obj[QStringLiteral("lon")] = element.lon();
|
||||
obj[QStringLiteral("lat")] = element.lat();
|
||||
obj[QStringLiteral("lon")] = element.lon;
|
||||
obj[QStringLiteral("lat")] = element.lat;
|
||||
return obj;
|
||||
}
|
||||
|
||||
@@ -47,15 +47,15 @@ ShootbackArea areaFromJson(const QJsonValue &val)
|
||||
{
|
||||
ShootbackArea area;
|
||||
// use val.toObject().value instead val[key] introduced with qt5.10
|
||||
area.identifier(val.toObject().value(QStringLiteral("identifier")).toString().toStdString());
|
||||
area.identifier = val.toObject().value(QStringLiteral("identifier")).toString().toStdString();
|
||||
|
||||
if (val.toObject().value(QStringLiteral("coords")).isArray())
|
||||
{
|
||||
const QJsonArray &arr = val.toObject().value(QStringLiteral("coords")).toArray();
|
||||
if (arr.size() > 0) area.coord1( posFromJson(arr.at(0)) );
|
||||
if (arr.size() > 1) area.coord2( posFromJson(arr.at(1)) );
|
||||
if (arr.size() > 2) area.coord3( posFromJson(arr.at(2)) );
|
||||
if (arr.size() > 3) area.coord4( posFromJson(arr.at(3)) );
|
||||
if (arr.size() > 0) area.coord1 = posFromJson(arr.at(0));
|
||||
if (arr.size() > 1) area.coord2 = posFromJson(arr.at(1));
|
||||
if (arr.size() > 2) area.coord3 = posFromJson(arr.at(2));
|
||||
if (arr.size() > 3) area.coord4 = posFromJson(arr.at(3));
|
||||
}
|
||||
return area;
|
||||
}
|
||||
@@ -63,13 +63,13 @@ ShootbackArea areaFromJson(const QJsonValue &val)
|
||||
QJsonObject toJson(const ShootbackArea &area)
|
||||
{
|
||||
QJsonObject obj;
|
||||
obj.insert(QStringLiteral("identifier"), QString::fromStdString(area.identifier()));
|
||||
obj.insert(QStringLiteral("identifier"), QString::fromStdString(area.identifier));
|
||||
|
||||
QJsonArray arr;
|
||||
arr.push_back(toJson(area.coord1()));
|
||||
arr.push_back(toJson(area.coord2()));
|
||||
arr.push_back(toJson(area.coord3()));
|
||||
arr.push_back(toJson(area.coord4()));
|
||||
arr.push_back(toJson(area.coord1));
|
||||
arr.push_back(toJson(area.coord2));
|
||||
arr.push_back(toJson(area.coord3));
|
||||
arr.push_back(toJson(area.coord4));
|
||||
obj.insert(QStringLiteral("coords"), arr);
|
||||
return obj;
|
||||
}
|
||||
@@ -121,14 +121,14 @@ ObjectTargetInformation::~ObjectTargetInformation()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
if (isValid())
|
||||
m_mainHandler->dts()->removeTargetInformationByKey(m_data.id());
|
||||
m_mainHandler->dts()->removeTargetInformationByKey(m_data.id);
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
bool ObjectTargetInformation::isValid() const
|
||||
{
|
||||
return m_data.id() > 0;
|
||||
return m_data.id > 0;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -137,14 +137,14 @@ Core::FunctionReplyObject ObjectTargetInformation::createObject(const TargetInfo
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
m_data = data;
|
||||
|
||||
if (m_data.id() <= 0)
|
||||
if (m_data.id <= 0)
|
||||
{
|
||||
Database::PpmTargetInformation dbData(toDbData(data));
|
||||
|
||||
if (!m_mainHandler->db()->insert(dbData))
|
||||
return Core::FunctionReplyObject(0, tr_lts("dds", "Error inserting TargetInformation-data into database"));
|
||||
|
||||
m_data.id(dbData.id);
|
||||
m_data.id = dbData.id;
|
||||
DEBUG_LOG(m_logger) << "New PpmTargetInformation: " /*<< m_data.id()*/;
|
||||
}
|
||||
|
||||
@@ -152,29 +152,29 @@ Core::FunctionReplyObject ObjectTargetInformation::createObject(const TargetInfo
|
||||
onPublishData();
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
return Core::FunctionReplyObject(m_data.id());
|
||||
return Core::FunctionReplyObject(m_data.id);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
Core::FunctionReplyObject ObjectTargetInformation::updateObject(const TargetInformation &data)
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START, participantId=" << data.participantId()
|
||||
<< " size =" << data.shootbackAreas().size();
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START, participantId=" << data.participantId
|
||||
<< " size =" << data.shootbackAreas.size();
|
||||
Database::PpmTargetInformation dbData;
|
||||
dbData = toDbData(data);
|
||||
|
||||
if (!m_mainHandler->db()->update(dbData))
|
||||
return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Error updating TargetInformation-data into database"));
|
||||
return Core::FunctionReplyObject(data.id, tr_lts("dds", "Error updating TargetInformation-data into database"));
|
||||
|
||||
m_data = data;
|
||||
DEBUG_LOG(m_logger) << "Data changed for TargetInformation: " << m_data.participantId();
|
||||
DEBUG_LOG(m_logger) << "Data changed for TargetInformation: " << m_data.participantId;
|
||||
|
||||
// Publish Data via DTS
|
||||
onPublishData();
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END, id=" << data.id()
|
||||
<< " size =" << data.shootbackAreas().size();
|
||||
return Core::FunctionReplyObject(m_data.id());
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END, id=" << data.id
|
||||
<< " size =" << data.shootbackAreas.size();
|
||||
return Core::FunctionReplyObject(m_data.id);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -182,21 +182,21 @@ Core::FunctionReplyObject ObjectTargetInformation::removeObject()
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
|
||||
if (!m_mainHandler->db()->removePpmTargetInformation(m_data.id()))
|
||||
return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "TargetInformation with id %1 can not be removed from DB")).arg(m_data.id());
|
||||
if (!m_mainHandler->db()->removePpmTargetInformation(m_data.id))
|
||||
return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "TargetInformation with id %1 can not be removed from DB")).arg(m_data.id);
|
||||
|
||||
if (!m_mainHandler->dts()->removeTargetInformationByKey(m_data.id()))
|
||||
return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "TargetInformation with id %1 can not be removed from DDS")).arg(m_data.id());
|
||||
if (!m_mainHandler->dts()->removeTargetInformationByKey(m_data.id))
|
||||
return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "TargetInformation with id %1 can not be removed from DDS")).arg(m_data.id);
|
||||
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
return Core::FunctionReplyObject(m_data.id());
|
||||
return Core::FunctionReplyObject(m_data.id);
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void ObjectTargetInformation::onPublishData()
|
||||
{
|
||||
TRACE_LOG(m_logger) << "Publish TargetInformation-data to dds (" << m_data.id() << ") ...";
|
||||
TRACE_LOG(m_logger) << "Publish TargetInformation-data to dds (" << m_data.id << ") ...";
|
||||
|
||||
if (!m_mainHandler->dts()->publish(m_data))
|
||||
ERROR_LOG(m_logger) << "Error publishing TargetInformation-data to dds";
|
||||
@@ -211,15 +211,15 @@ Database::PpmTargetInformation ObjectTargetInformation::toDbData(const TargetInf
|
||||
{
|
||||
Database::PpmTargetInformation dbData;
|
||||
|
||||
dbData.id = ddsData.id();
|
||||
dbData.participantId = ddsData.participantId();
|
||||
dbData.id = ddsData.id;
|
||||
dbData.participantId = ddsData.participantId;
|
||||
|
||||
dbData.preWarningInterval = ddsData.prewarningInterval();
|
||||
dbData.preWarningEffect = static_cast<int>(ddsData.prewarningEffect().underlying());
|
||||
dbData.takeDownInterval = ddsData.takedownInterval();
|
||||
dbData.takeDownEffect = static_cast<int>(ddsData.takedownEffect().underlying());
|
||||
dbData.preWarningInterval = ddsData.prewarningInterval;
|
||||
dbData.preWarningEffect = static_cast<int>(ddsData.prewarningEffect);
|
||||
dbData.takeDownInterval = ddsData.takedownInterval;
|
||||
dbData.takeDownEffect = static_cast<int>(ddsData.takedownEffect);
|
||||
|
||||
const std::vector<ParticipantManagement::ShootbackArea>& shootback_areas = ddsData.shootbackAreas();
|
||||
const std::vector<ParticipantManagement::ShootbackArea>& shootback_areas = ddsData.shootbackAreas;
|
||||
|
||||
const QJsonObject &obj = toJson(shootback_areas);
|
||||
dbData.properties = QString::fromStdString( QJsonDocument(obj).toJson(QJsonDocument::Compact).toStdString() );
|
||||
@@ -233,13 +233,13 @@ TargetInformation ObjectTargetInformation::toDdsData(const Database::PpmTargetIn
|
||||
{
|
||||
TargetInformation ddsData;
|
||||
|
||||
ddsData.id(dbData.id);
|
||||
ddsData.participantId(dbData.participantId);
|
||||
ddsData.id = dbData.id;
|
||||
ddsData.participantId = dbData.participantId;
|
||||
|
||||
ddsData.prewarningInterval(dbData.preWarningInterval);
|
||||
ddsData.prewarningEffect(static_cast<ProjectDataManagement::VulnerabilityState>(dbData.preWarningEffect));
|
||||
ddsData.takedownInterval(dbData.takeDownInterval);
|
||||
ddsData.takedownEffect(static_cast<ProjectDataManagement::VulnerabilityState>(dbData.takeDownEffect));
|
||||
ddsData.prewarningInterval = dbData.preWarningInterval;
|
||||
ddsData.prewarningEffect = static_cast<ProjectDataManagement::VulnerabilityState>(dbData.preWarningEffect);
|
||||
ddsData.takedownInterval = dbData.takeDownInterval;
|
||||
ddsData.takedownEffect = static_cast<ProjectDataManagement::VulnerabilityState>(dbData.takeDownEffect);
|
||||
|
||||
const QByteArray &propertiesBa = dbData.properties.toUtf8();
|
||||
QJsonParseError parserError;
|
||||
@@ -252,7 +252,7 @@ TargetInformation ObjectTargetInformation::toDdsData(const Database::PpmTargetIn
|
||||
|
||||
QJsonObject obj(doc.object());
|
||||
const std::vector<ShootbackArea> &sbAreas = vecfromJson(obj);
|
||||
ddsData.shootbackAreas(sbAreas);
|
||||
ddsData.shootbackAreas = sbAreas;
|
||||
|
||||
return ddsData;
|
||||
}
|
||||
|
||||
+2
-2
@@ -35,8 +35,8 @@ public:
|
||||
Core::FunctionReplyObject updateObject(const TargetInformation &data);
|
||||
Core::FunctionReplyObject removeObject();
|
||||
|
||||
qint32 getId() const { return m_data.id(); }
|
||||
qint32 getParticipantId() const { return m_data.participantId(); }
|
||||
qint32 getId() const { return m_data.id; }
|
||||
qint32 getParticipantId() const { return m_data.participantId; }
|
||||
const TargetInformation &getData() const { return m_data; }
|
||||
|
||||
bool isValid() const;
|
||||
|
||||
Reference in new issue
Block a user