Adds immediate migration results
This commit is contained in:
2395 files changed
+357322
-2524
No files matched your search
@@ -1,6 +1,7 @@
|
||||
|
||||
|
||||
#include "XmlReader.h"
|
||||
#include <utility>
|
||||
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
|
||||
@@ -134,7 +135,7 @@ bool XmlReader::readServiceFile(const QString &svcFile,
|
||||
const QString groupNamesString = getAttribute(domRoot, QStringLiteral("groups"), true);
|
||||
if (!groupNamesString.isEmpty())
|
||||
{
|
||||
m_groupNames = groupNamesString.split(QLatin1Char(','), QString::SkipEmptyParts);
|
||||
m_groupNames = groupNamesString.split(QLatin1Char(','), Qt::SkipEmptyParts);
|
||||
INFO_LOG(m_logger) << "groups: " << groupNamesString;
|
||||
}
|
||||
else
|
||||
@@ -471,15 +472,20 @@ void XmlReader::parseTopicTypes(const QDomElement &rootElement)
|
||||
isi.baseValueType = getAttribute(domIdlStruct, QStringLiteral("baseValueType"), true);
|
||||
|
||||
|
||||
const QVector<QStringRef> sl = isi.baseValueType.splitRef(QStringLiteral("::"));
|
||||
const QStringList sl = isi.baseValueType.split(QStringLiteral("::"));
|
||||
if (sl.size() == 2)
|
||||
loadExternalTopicType(sl.at(0).toString(), sl.at(1).toString());
|
||||
loadExternalTopicType(sl.at(0), sl.at(1));
|
||||
|
||||
const QString tmp = getAttribute(domIdlStruct, QStringLiteral("extensibility"), true);
|
||||
|
||||
#ifdef RTI_HEADER_AVAILABLE
|
||||
if (tmp.compare(QLatin1String("FINAL"), Qt::CaseInsensitive) == 0) isi.extensibility = dds::core::xtypes::ExtensibilityKind::FINAL;
|
||||
if (tmp.compare(QLatin1String("MUTABLE"), Qt::CaseInsensitive) == 0) isi.extensibility = dds::core::xtypes::ExtensibilityKind::MUTABLE;
|
||||
if (tmp.compare(QLatin1String("EXTENSIBLE"), Qt::CaseInsensitive) == 0) isi.extensibility = dds::core::xtypes::ExtensibilityKind::EXTENSIBLE;
|
||||
#else
|
||||
// RTI not available - skip extensibility parsing
|
||||
Q_UNUSED(tmp)
|
||||
#endif
|
||||
|
||||
isi.comment = getAttribute(domIdlStruct, QStringLiteral("comment"), true);
|
||||
isi.isDataObject = getAttributeBool(domIdlStruct, QStringLiteral("isDataObject"), true, false);
|
||||
@@ -530,14 +536,14 @@ void XmlReader::parseFunctionTopics(const QDomElement &rootElement)
|
||||
domFunctionTopic = domFunctionTopic.nextSiblingElement(domFunctionTopic.tagName());
|
||||
}
|
||||
|
||||
for (const FunctionTopic &ft : qAsConst(m_functionTopics))
|
||||
for (const FunctionTopic &ft : std::as_const(m_functionTopics))
|
||||
{
|
||||
const QVector<QStringRef> sl1 = ft.requestTopicType.splitRef(QStringLiteral("::"));
|
||||
const QStringList sl1 = ft.requestTopicType.split(QStringLiteral("::"));
|
||||
if (sl1.size() == 2)
|
||||
loadExternalTopicType(sl1.at(0).toString(), sl1.at(1).toString());
|
||||
const QVector<QStringRef> sl2 = ft.replyTopicType.splitRef(QStringLiteral("::"));
|
||||
loadExternalTopicType(sl1.at(0), sl1.at(1));
|
||||
const QStringList sl2 = ft.replyTopicType.split(QStringLiteral("::"));
|
||||
if (sl2.size() == 2)
|
||||
loadExternalTopicType(sl2.at(0).toString(), sl2.at(1).toString());
|
||||
loadExternalTopicType(sl2.at(0), sl2.at(1));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -847,18 +853,18 @@ void XmlReader::loadIdlInfofile(const QString &idlServiceInfoFile)
|
||||
if (filePath.startsWith("--") || filePath.trimmed().isEmpty())
|
||||
continue;
|
||||
const QString fileName = QString::fromLocal8Bit(filePath.trimmed());
|
||||
const QVector<QStringRef> parts = fileName.splitRef(QLatin1Char('/'));
|
||||
const QStringList parts = fileName.split(QStringLiteral("/"));
|
||||
getServiceNameInfoFromFilePath(parts);
|
||||
const auto fn = parts.last().trimmed();
|
||||
if (fn.endsWith(QLatin1String(".xml")))
|
||||
{
|
||||
const auto svcAbbreveation = fn.split(QLatin1Char('.')).at(0).split(QLatin1Char('_')).at(0);
|
||||
m_xmlFiles[svcAbbreveation.toString()] = fileName;
|
||||
DEBUG_LOG(m_logger) << "xml: " << svcAbbreveation.toString() << " = " << fileName;
|
||||
m_xmlFiles[svcAbbreveation] = fileName;
|
||||
DEBUG_LOG(m_logger) << "xml: " << svcAbbreveation << " = " << fileName;
|
||||
}
|
||||
else
|
||||
{
|
||||
const auto svcAbbreveation = fn.split(QLatin1Char('.')).at(0).toString().toLower();
|
||||
const auto svcAbbreveation = fn.split(QLatin1Char('.')).at(0).toLower();
|
||||
if (svcAbbreveation.endsWith(QLatin1String("_enums")))
|
||||
continue;
|
||||
m_idlFiles[svcAbbreveation] = fileName;
|
||||
@@ -880,14 +886,14 @@ QString XmlReader::serviceNameAbbreviation(const QString &serviceName) const
|
||||
return m_fullServiceName2Abbreviation.value(serviceName);
|
||||
}
|
||||
|
||||
void XmlReader::getServiceNameInfoFromFilePath(const QVector<QStringRef> &parts)
|
||||
void XmlReader::getServiceNameInfoFromFilePath(const QStringList &parts)
|
||||
{
|
||||
if (parts.size() < 2)
|
||||
return;
|
||||
|
||||
|
||||
const QString abbreviation = parts.last().split(QLatin1Char('.')).first().split(QLatin1Char('_')).first().toString();
|
||||
const QString serviceName = parts.at(parts.size() - 2).toString();
|
||||
const QString abbreviation = parts.last().split(QLatin1Char('.')).first().split(QLatin1Char('_')).first();
|
||||
const QString serviceName = parts.at(parts.size() - 2);
|
||||
DEBUG_LOG(m_logger) << "serviceName: " << serviceName << " = " << abbreviation;
|
||||
m_fullServiceName2Abbreviation[serviceName] = abbreviation;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user