Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/TetraIF/LogView/LogViewXdrElement.cpp
T
berrux-dev 473462cbdb Fix LogView consistency and LtsUtilsGuiDds link after the merge
- LogView: take the complete XmlPatterns (d327c66c4) file set - the
  auto-merged mix (XmlPatterns .cpp + validation .hpp) left duplicated
  m_logger members and constructor signature mismatches, because the
  two lineages reworked the module differently.
- LogView CMakeLists: the cleanup version (separate LogViewLogger
  static library, required by tabPluginTetraJson and present in the
  Release 2 target list).
- LtsUtilsGuiDds: link ddscore (BUILD_RTI) for the Core::FunctionReply
  symbols, as in story/release-2-cleanup.

Full-scope ninja all is green; ctest 20/22 (the two failures,
GrantleeParserSmoke and utils_test, are out of the driver's 46-target
scope and 'Not Run' in the official baseline).
2026-11-16 20:24:04 +01:00

62 lines
1.1 KiB
C++

#include "LogViewXdrElement.hpp"
namespace N_LogView
{
LogViewXdrElement::LogViewXdrElement(const QString& a_name, const E_ElementKind a_kind, const char *loggerName)
: m_Name(a_name)
, m_Kind(a_kind)
, m_logger(getLogger(loggerName))
{
if (a_name.indexOf(QLatin1Char('<')) >= 0 || a_name.indexOf(QLatin1Char('[')) >= 0)
ERROR_LOG(m_logger) << "Element \'" << a_name.toStdString() << "\' has a problem";
}
void LogViewXdrElement::dump() const
{
INFO_LOG(m_logger) << "Element[" << getName() << "]: kind=" << getKindName();
}
QString LogViewXdrElement::getKindName() const
{
switch (getKind())
{
case e_KindDefine:
return QLatin1String("Define");
case e_KindEnum:
return QLatin1String("Enum");
case e_KindEnumElement:
return QLatin1String("EnumElement");
case e_KindStandardType:
return QLatin1String("StandardType");
case e_KindStruct:
return QLatin1String("Struct");
case e_KindStructElement:
return QLatin1String("StructElement");
case e_KindTypedef:
return QLatin1String("Typedef");
}
return QStringLiteral("Unknown (%1)").arg(getKind());
}
}