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
@@ -0,0 +1,267 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <QMap>
|
||||
#include <QString>
|
||||
|
||||
namespace SymbologyXML
|
||||
{
|
||||
|
||||
// Um die Moeglichkeiten des typechecking zu nutzehn, erstellen wird die
|
||||
// folgende Klasse als template-class:
|
||||
template<typename TYPE>
|
||||
class AttributeData
|
||||
{
|
||||
protected:
|
||||
// enum -> internal String (XML-File)
|
||||
QMap<TYPE, QString> enum2str;
|
||||
|
||||
// internal String (XML-File)-> enum
|
||||
QMap<QString, TYPE> str2enum;
|
||||
|
||||
// enum -> external String (for translation)
|
||||
QMap<TYPE, QString> enum2Tr;
|
||||
|
||||
// Order to fill the ComboBox
|
||||
QVector<TYPE> order;
|
||||
|
||||
public:
|
||||
void insert(const TYPE &enumKey, const QString &InternalString, const QString &ExternalString) {
|
||||
enum2str.insert(enumKey, InternalString);
|
||||
str2enum.insert(InternalString, enumKey);
|
||||
enum2Tr.insert(enumKey, ExternalString);
|
||||
order.push_back(enumKey);
|
||||
}
|
||||
|
||||
QString convert_enum2str(const TYPE &enumKey) const
|
||||
{
|
||||
QString ret;
|
||||
if ( enum2str.contains(enumKey) )
|
||||
{
|
||||
ret = enum2str[enumKey];
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = enum2str.value(*order.begin()); // == "FOO_UNDEFINED"
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
QString convert_enum2tr(const TYPE &enumKey) const
|
||||
{
|
||||
QString ret;
|
||||
if ( enum2Tr.contains(enumKey) )
|
||||
{
|
||||
ret = enum2Tr[enumKey];
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = enum2str.value(*order.begin()); // == "FOO_UNDEFINED"
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
TYPE convert_str2enum(const QString& str_ref, bool* bOk = nullptr) const
|
||||
{
|
||||
TYPE ret = *order.begin(); // == FOO_UNDEFINED
|
||||
if ( str2enum.contains(str_ref) )
|
||||
{
|
||||
ret = str2enum[str_ref];
|
||||
if (bOk)
|
||||
*bOk = true;
|
||||
} else {
|
||||
if (bOk)
|
||||
*bOk = false;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
TYPE convert_str2enum(const QStringRef& str_ref, bool* bOk = nullptr) const
|
||||
{
|
||||
return convert_str2enum(str_ref.toString(), bOk);
|
||||
}
|
||||
|
||||
void clear()
|
||||
{
|
||||
enum2str.clear();
|
||||
str2enum.clear();
|
||||
enum2Tr.clear();
|
||||
order.clear();
|
||||
}
|
||||
|
||||
size_t size() const {
|
||||
return order.size();
|
||||
}
|
||||
|
||||
QMap<int, QString> getContainerAsInt() const {
|
||||
QMap<int, QString> retMap;
|
||||
|
||||
QVectorIterator<TYPE> i(order);
|
||||
TYPE val;
|
||||
while (i.hasNext()) {
|
||||
val = i.next();
|
||||
retMap.insert((int)val, convert_enum2tr(val));
|
||||
}
|
||||
return retMap;
|
||||
}
|
||||
|
||||
QVectorIterator<TYPE> getIterator() const {
|
||||
return order;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Um die Moeglichkeiten des typechecking zu nutzen, erstellen wird die
|
||||
// folgende Klasse als template-class:
|
||||
template<typename TYPE_SECTORICON>
|
||||
class AttributeDataSectorIcon : public AttributeData<TYPE_SECTORICON>
|
||||
{
|
||||
protected:
|
||||
|
||||
QVector<TYPE_SECTORICON> orderSector1;
|
||||
QVector<TYPE_SECTORICON> orderSector2;
|
||||
|
||||
QVector<TYPE_SECTORICON> orderSectorMain;
|
||||
QVector<TYPE_SECTORICON> orderSectorMainComboBox;
|
||||
QVector<TYPE_SECTORICON> orderSectorMainListView;
|
||||
|
||||
QVector<TYPE_SECTORICON> orderSectorFullFramed;
|
||||
|
||||
public:
|
||||
size_t size() const = delete;
|
||||
|
||||
void clear()
|
||||
{
|
||||
AttributeData<TYPE_SECTORICON>::clear();
|
||||
orderSector1.clear();
|
||||
orderSector2.clear();
|
||||
|
||||
orderSectorMain.clear();
|
||||
orderSectorMainComboBox.clear();
|
||||
orderSectorMainListView.clear();
|
||||
|
||||
orderSectorFullFramed.clear();
|
||||
}
|
||||
|
||||
bool contains(const TYPE_SECTORICON &id,
|
||||
SymbolTypes::t_sector_position sectorPosition,
|
||||
SymbolTypes::t_select_widget selectWidget = SymbolTypes::SELECT_WIDGET_UNDEFINED) const
|
||||
{
|
||||
bool found = false;
|
||||
|
||||
const QVector<TYPE_SECTORICON>* cont_p = this->getContainer(sectorPosition, selectWidget);
|
||||
if (cont_p)
|
||||
{
|
||||
found = cont_p->contains(id);
|
||||
}
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
void insert(const TYPE_SECTORICON &enumKey,
|
||||
const QString &InternalString,
|
||||
const QString &ExternalString,
|
||||
int sectorPositions,
|
||||
SymbolTypes::t_select_widget selectWidget = SymbolTypes::SELECT_WIDGET_UNDEFINED) {
|
||||
AttributeData<TYPE_SECTORICON>::insert(enumKey, InternalString, ExternalString);
|
||||
|
||||
if (sectorPositions & SymbolTypes::SECTOR1)
|
||||
this->orderSector1.push_back(enumKey);
|
||||
|
||||
if (sectorPositions & SymbolTypes::SECTOR2)
|
||||
this->orderSector2.push_back(enumKey);
|
||||
|
||||
if (sectorPositions & SymbolTypes::SECTORMAIN) {
|
||||
this->orderSectorMain.push_back(enumKey);
|
||||
|
||||
switch (selectWidget)
|
||||
{
|
||||
case SymbolTypes::SELECT_WIDGET_UNDEFINED:
|
||||
{
|
||||
// empty
|
||||
}
|
||||
break;
|
||||
case SymbolTypes::SELECT_WIDGET_CB:
|
||||
this->orderSectorMainComboBox.push_back(enumKey);
|
||||
break;
|
||||
case SymbolTypes::SELECT_WIDGET_LV:
|
||||
this->orderSectorMainListView.push_back(enumKey);
|
||||
break;
|
||||
} // switch
|
||||
|
||||
} // if
|
||||
|
||||
if (sectorPositions & SymbolTypes::SECTORFF)
|
||||
this->orderSectorFullFramed.push_back(enumKey);
|
||||
};
|
||||
|
||||
const QVector<TYPE_SECTORICON>* getContainer(SymbolTypes::t_sector_position sectorPosition,
|
||||
SymbolTypes::t_select_widget selectWidget = SymbolTypes::SELECT_WIDGET_UNDEFINED) const
|
||||
{
|
||||
const QVector<TYPE_SECTORICON>* cont_p = nullptr;
|
||||
|
||||
switch(sectorPosition)
|
||||
{
|
||||
case SymbolTypes::SECTOR1:
|
||||
cont_p = &orderSector1;
|
||||
break;
|
||||
case SymbolTypes::SECTOR2:
|
||||
cont_p = &orderSector2;
|
||||
break;
|
||||
case SymbolTypes::SECTORMAIN:
|
||||
{
|
||||
|
||||
switch (selectWidget)
|
||||
{
|
||||
case SymbolTypes::SELECT_WIDGET_UNDEFINED:
|
||||
cont_p = &orderSectorMain;
|
||||
break;
|
||||
case SymbolTypes::SELECT_WIDGET_CB:
|
||||
cont_p = &orderSectorMainComboBox;
|
||||
break;
|
||||
case SymbolTypes::SELECT_WIDGET_LV:
|
||||
cont_p = &orderSectorMainListView;
|
||||
break;
|
||||
} // switch
|
||||
|
||||
}
|
||||
break;
|
||||
case SymbolTypes::SECTORFF:
|
||||
cont_p = &orderSectorFullFramed;
|
||||
break;
|
||||
case SymbolTypes::SECTOR_POSITION_UNDEFINED:
|
||||
{
|
||||
// empty - avoiding compiler warning
|
||||
}
|
||||
|
||||
} // switch
|
||||
|
||||
return cont_p;
|
||||
}
|
||||
|
||||
const QMap<int, QString> getContainerAsInt(SymbolTypes::t_sector_position sectorPosition,
|
||||
SymbolTypes::t_select_widget selectWidget = SymbolTypes::SELECT_WIDGET_UNDEFINED) const {
|
||||
QMap<int, QString> retMap;
|
||||
|
||||
const QVector<TYPE_SECTORICON>* cont_p = getContainer(sectorPosition, selectWidget);
|
||||
QVectorIterator<TYPE_SECTORICON> iter(*cont_p);
|
||||
TYPE_SECTORICON val;
|
||||
while (iter.hasNext()) {
|
||||
val = iter.next();
|
||||
retMap.insert((int)val, this->convert_enum2tr(val));
|
||||
}
|
||||
return retMap;
|
||||
};
|
||||
|
||||
}; // AttributeDataSectorIcon
|
||||
|
||||
}; // namespace SymbologyXML
|
||||
Reference in new issue
Block a user