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:
18662 files changed
+4115092
-5435
No files matched your search
+222
@@ -0,0 +1,222 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Template for 'real' structures including insert/update/delete functions for db
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
|
||||
// filename: tab_db_structs.cpp
|
||||
#include "tab_db_structs.h"
|
||||
#include "tab_export.h"
|
||||
|
||||
namespace TrainingAreaBase
|
||||
{
|
||||
namespace Database
|
||||
{
|
||||
QString jsonValueToJsonString(const QJsonValue &value)
|
||||
{
|
||||
return value.isNull() ? QStringLiteral("{}") : value.toString();
|
||||
}
|
||||
|
||||
QString qVariantToJsonString(const QVariant &value)
|
||||
{
|
||||
return value.isNull() ? QStringLiteral("{}") : value.toString();
|
||||
}
|
||||
|
||||
QString fixupEmptyJsonString(const QString &str)
|
||||
{
|
||||
return str.isEmpty() ? QStringLiteral("{}") : str;
|
||||
}
|
||||
|
||||
// Basic type toJson overloads
|
||||
QJsonValue toJson(int val)
|
||||
{
|
||||
return QJsonValue(val);
|
||||
}
|
||||
QJsonValue toJson(double val)
|
||||
{
|
||||
return QJsonValue(val);
|
||||
}
|
||||
QJsonValue toJson(qint64 val)
|
||||
{
|
||||
return QJsonValue(QString::number(val));
|
||||
}
|
||||
QJsonValue toJson(const std::string &val)
|
||||
{
|
||||
return QJsonValue(QString::fromStdString(val));
|
||||
}
|
||||
|
||||
// QPointF
|
||||
QJsonValue toJson(const QPointF &element)
|
||||
{
|
||||
QJsonObject obj;
|
||||
obj.insert(QStringLiteral("x"), QJsonValue(element.x()));
|
||||
obj.insert(QStringLiteral("y"), QJsonValue(element.y()));
|
||||
return QJsonValue(obj);
|
||||
}
|
||||
template<>
|
||||
QPointF fromJson(const QJsonValue &val)
|
||||
{
|
||||
QJsonObject obj = val.toObject();
|
||||
return QPointF(obj.value(QStringLiteral("x")).toDouble(), obj.value(QStringLiteral("y")).toDouble());
|
||||
}
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Struct: AesId2TaId
|
||||
//
|
||||
QJsonObject toJson(const AesId2TaId &element)
|
||||
{
|
||||
QJsonObject obj;
|
||||
obj[QStringLiteral("aesTetraId")] = element.aesTetraId;
|
||||
obj[QStringLiteral("aesDdsId")] = element.aesDdsId;
|
||||
obj[QStringLiteral("exerciseId")] = element.exerciseId;
|
||||
obj[QStringLiteral("isAvailableInTetra")] = element.isAvailableInTetra;
|
||||
return obj;
|
||||
}
|
||||
|
||||
template<>
|
||||
AesId2TaId fromJson(const QJsonValue &value)
|
||||
{
|
||||
const QJsonObject objElement(value.toObject());
|
||||
AesId2TaId element;
|
||||
|
||||
|
||||
{ const QJsonValue val(objElement.value(QStringLiteral("aesTetraId"))); element.aesTetraId = val.toInt(); }
|
||||
{ const QJsonValue val(objElement.value(QStringLiteral("aesDdsId"))); element.aesDdsId = val.toInt(); }
|
||||
{ const QJsonValue val(objElement.value(QStringLiteral("exerciseId"))); element.exerciseId = val.toInt(); }
|
||||
{ const QJsonValue val(objElement.value(QStringLiteral("isAvailableInTetra"))); element.isAvailableInTetra = val.toBool(); }
|
||||
|
||||
return element;
|
||||
}
|
||||
// AesId2TaId end
|
||||
|
||||
//
|
||||
// Struct: PrtCnvMember
|
||||
//
|
||||
QJsonObject toJson(const PrtCnvMember &element)
|
||||
{
|
||||
QJsonObject obj;
|
||||
obj[QStringLiteral("id")] = element.id;
|
||||
obj[QStringLiteral("issi")] = element.issi;
|
||||
obj[QStringLiteral("licensed")] = element.licensed;
|
||||
obj[QStringLiteral("claims")] = element.claims;
|
||||
obj[QStringLiteral("exerciseId")] = element.exerciseId;
|
||||
return obj;
|
||||
}
|
||||
|
||||
template<>
|
||||
PrtCnvMember fromJson(const QJsonValue &value)
|
||||
{
|
||||
const QJsonObject objElement(value.toObject());
|
||||
PrtCnvMember element;
|
||||
|
||||
|
||||
{ const QJsonValue val(objElement.value(QStringLiteral("id"))); element.id = val.toInt(); }
|
||||
{ const QJsonValue val(objElement.value(QStringLiteral("issi"))); element.issi = val.toInt(); }
|
||||
{ const QJsonValue val(objElement.value(QStringLiteral("licensed"))); element.licensed = val.toInt(); }
|
||||
{ const QJsonValue val(objElement.value(QStringLiteral("claims"))); element.claims = val.toInt(); }
|
||||
{ const QJsonValue val(objElement.value(QStringLiteral("exerciseId"))); element.exerciseId = val.toInt(); }
|
||||
|
||||
return element;
|
||||
}
|
||||
// PrtCnvMember end
|
||||
|
||||
//
|
||||
// Struct: PrtCnvStatus
|
||||
//
|
||||
QJsonObject toJson(const PrtCnvStatus &element)
|
||||
{
|
||||
QJsonObject obj;
|
||||
obj[QStringLiteral("id")] = element.id;
|
||||
obj[QStringLiteral("resetCounter")] = element.resetCounter;
|
||||
obj[QStringLiteral("ctasOperatingState")] = element.ctasOperatingState;
|
||||
obj[QStringLiteral("machineState")] = element.machineState;
|
||||
return obj;
|
||||
}
|
||||
|
||||
template<>
|
||||
PrtCnvStatus fromJson(const QJsonValue &value)
|
||||
{
|
||||
const QJsonObject objElement(value.toObject());
|
||||
PrtCnvStatus element;
|
||||
|
||||
|
||||
{ const QJsonValue val(objElement.value(QStringLiteral("id"))); element.id = val.toInt(); }
|
||||
{ const QJsonValue val(objElement.value(QStringLiteral("resetCounter"))); element.resetCounter = val.toInt(); }
|
||||
{ const QJsonValue val(objElement.value(QStringLiteral("ctasOperatingState"))); element.ctasOperatingState = val.toInt(); }
|
||||
{ const QJsonValue val(objElement.value(QStringLiteral("machineState"))); element.machineState = val.toInt(); }
|
||||
|
||||
return element;
|
||||
}
|
||||
// PrtCnvStatus end
|
||||
|
||||
//
|
||||
// Struct: PrtCnvToCentral
|
||||
//
|
||||
QJsonObject toJson(const PrtCnvToCentral &element)
|
||||
{
|
||||
QJsonObject obj;
|
||||
obj[QStringLiteral("id")] = element.id;
|
||||
obj[QStringLiteral("telId")] = element.telId;
|
||||
obj[QStringLiteral("counter")] = element.counter;
|
||||
obj[QStringLiteral("data")] = QString::fromLatin1(element.data.toBase64());
|
||||
return obj;
|
||||
}
|
||||
|
||||
template<>
|
||||
PrtCnvToCentral fromJson(const QJsonValue &value)
|
||||
{
|
||||
const QJsonObject objElement(value.toObject());
|
||||
PrtCnvToCentral element;
|
||||
|
||||
|
||||
{ const QJsonValue val(objElement.value(QStringLiteral("id"))); element.id = val.toInt(); }
|
||||
{ const QJsonValue val(objElement.value(QStringLiteral("telId"))); element.telId = val.toInt(); }
|
||||
{ const QJsonValue val(objElement.value(QStringLiteral("counter"))); element.counter = val.toInt(); }
|
||||
{ const QJsonValue val(objElement.value(QStringLiteral("data"))); element.data = QByteArray::fromBase64(val.toString().toLatin1()); }
|
||||
|
||||
return element;
|
||||
}
|
||||
// PrtCnvToCentral end
|
||||
|
||||
//
|
||||
// Struct: PrtCnvToRadio
|
||||
//
|
||||
QJsonObject toJson(const PrtCnvToRadio &element)
|
||||
{
|
||||
QJsonObject obj;
|
||||
obj[QStringLiteral("id")] = element.id;
|
||||
obj[QStringLiteral("telId")] = element.telId;
|
||||
obj[QStringLiteral("counter")] = element.counter;
|
||||
obj[QStringLiteral("broadcastIndex")] = element.broadcastIndex;
|
||||
obj[QStringLiteral("resetCounter")] = element.resetCounter;
|
||||
obj[QStringLiteral("data")] = QString::fromLatin1(element.data.toBase64());
|
||||
return obj;
|
||||
}
|
||||
|
||||
template<>
|
||||
PrtCnvToRadio fromJson(const QJsonValue &value)
|
||||
{
|
||||
const QJsonObject objElement(value.toObject());
|
||||
PrtCnvToRadio element;
|
||||
|
||||
|
||||
{ const QJsonValue val(objElement.value(QStringLiteral("id"))); element.id = val.toInt(); }
|
||||
{ const QJsonValue val(objElement.value(QStringLiteral("telId"))); element.telId = val.toInt(); }
|
||||
{ const QJsonValue val(objElement.value(QStringLiteral("counter"))); element.counter = val.toInt(); }
|
||||
{ const QJsonValue val(objElement.value(QStringLiteral("broadcastIndex"))); element.broadcastIndex = val.toInt(); }
|
||||
{ const QJsonValue val(objElement.value(QStringLiteral("resetCounter"))); element.resetCounter = val.toInt(); }
|
||||
{ const QJsonValue val(objElement.value(QStringLiteral("data"))); element.data = QByteArray::fromBase64(val.toString().toLatin1()); }
|
||||
|
||||
return element;
|
||||
}
|
||||
// PrtCnvToRadio end
|
||||
|
||||
|
||||
} // namespace Database
|
||||
} // namespace TrainingAreaBase
|
||||
|
||||
Reference in new issue
Block a user