Qt6 Migration: DDS-Stubs, Logger-Fixes, Export-Header Korrekturen
- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung - 44 Export-Header Include-Pfade korrigiert (_export.h) - 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h) - INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros - Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits) - FATAL_LOG Makro hinzugefügt - InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h) - FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h) - AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp) - SymbolAppearance Klasse vollständig definiert mit content() Methode - BuildingComponentFilter Klasse definiert mit Copy-Konstruktor - Ftc Factory: nullptr Return (abstract class) - AesFilter Klasse in aes.hpp hinzugefügt - Dtc Klasse in ppm.hpp mit participantChanged Signal - AesType Enum: alle 15 At* Werte definiert - AesEffectState_def: EsReceived hinzugefügt - DataModification Enum: eAdded/eModified/eRemoved - function_reply_object.h → core_types.h Include-Pfad (72 Dateien) - Enum-Class-Streaming Template-Operator in INGLLogger.h - ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen - ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge - QRegExp → QRegularExpression in tpm_js_parser.cpp - .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert - Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2785 files changed
+18754
-18316
No files matched your search
@@ -31,8 +31,7 @@ LogViewField::LogViewField(const QString& a_name, const E_FieldKind a_kind, cons
|
||||
m_HasContent(true),
|
||||
m_bDeleteXdr(false),
|
||||
m_Kind(a_kind),
|
||||
m_XdrElement(a_xdrElement),
|
||||
m_logger(getLogger("LogViewField"))
|
||||
m_XdrElement(a_xdrElement)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -166,7 +165,7 @@ int64_t LogViewField::getHighestValue() const
|
||||
return highest;
|
||||
}
|
||||
default:
|
||||
ERROR_LOG(m_logger) << "Case not implemented";
|
||||
ERROR_LOG() << "Case not implemented";
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -194,7 +193,7 @@ int64_t LogViewField::getLowestValue() const
|
||||
return lowest;
|
||||
}
|
||||
default:
|
||||
ERROR_LOG(m_logger) << "Case not implemented";
|
||||
ERROR_LOG() << "Case not implemented";
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
@@ -204,16 +203,16 @@ int64_t LogViewField::getLowestValue() const
|
||||
|
||||
void LogViewField::dump(const QString &a_indent) const
|
||||
{
|
||||
INFO_LOG(m_logger) << a_indent << "[";
|
||||
INFO_LOG(m_logger) << a_indent << "Field[" << m_Name << "]: m_Kind=" << m_Kind << " m_Offset=" << m_Offset << " m_Size=" << m_Size << " m_MaxArraySize=" << m_MaxArraySize << " m_IsRightAligned=" << m_IsRightAligned << " m_IsDynamicArray=" << m_IsDynamicArray << " m_ToolTipText=" << m_ToolTipText;
|
||||
INFO_LOG() << a_indent << "[";
|
||||
INFO_LOG() << a_indent << "Field[" << m_Name << "]: m_Kind=" << m_Kind << " m_Offset=" << m_Offset << " m_Size=" << m_Size << " m_MaxArraySize=" << m_MaxArraySize << " m_IsRightAligned=" << m_IsRightAligned << " m_IsDynamicArray=" << m_IsDynamicArray << " m_ToolTipText=" << m_ToolTipText;
|
||||
|
||||
for (int i=0; i<m_ValueList.size(); i++)
|
||||
INFO_LOG(m_logger) << a_indent << "m_Value[" << i << "]=" << m_ValueList[i];
|
||||
INFO_LOG() << a_indent << "m_Value[" << i << "]=" << m_ValueList[i];
|
||||
|
||||
for (auto *c : m_Child)
|
||||
c->dump(a_indent + QLatin1Char(' '));
|
||||
|
||||
INFO_LOG(m_logger) << a_indent << "]";
|
||||
INFO_LOG() << a_indent << "]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -134,9 +134,5 @@ namespace N_LogView
|
||||
const LogViewXdrElement *m_XdrElement;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
}
|
||||
@@ -73,7 +73,6 @@ LogViewGui::LogViewGui(QWidget* a_parent)
|
||||
, m_InjectionThread(nullptr)
|
||||
, m_replayTimer(new QTimer(this))
|
||||
, m_currentReplayRow(-1)
|
||||
, m_logger(getLogger("LogViewGui"))
|
||||
{
|
||||
setWindowIcon(QIcon(QLatin1String(":icons/16x16/rde_16x16.png")));
|
||||
|
||||
@@ -528,7 +527,7 @@ void LogViewGui::onReplayTimerTimeout()
|
||||
return;
|
||||
|
||||
uint64_t nextSendTime = (tele->getLogTimeMsec() - curSendTime);
|
||||
DEBUG_LOG(m_logger) << "Next SendTime: " << nextSendTime
|
||||
DEBUG_LOG() << "Next SendTime: " << nextSendTime
|
||||
<< ", telId: " << tele->getTelId()
|
||||
<< ", next row: " << m_currentReplayRow
|
||||
<< ", equipNo: " << tele->getParticipantId();
|
||||
@@ -546,7 +545,7 @@ void LogViewGui::loadSpecificationFiles()
|
||||
|
||||
QString defString = QCoreApplication::applicationDirPath() + QLatin1String("/training_area_telegrams.h");
|
||||
QString filename = settings.value(LogViewOptionDialog::P0_FILENAME, defString).toString();
|
||||
INFO_LOG(m_logger) << "Load central-protocol spezification-file: " << filename.toStdString();
|
||||
INFO_LOG() << "Load central-protocol spezification-file: " << filename.toStdString();
|
||||
if (!QFile::exists(filename))
|
||||
{
|
||||
QMessageBox::warning(this, tr("LogView"), tr("Die Spezifikations-Datei \'%1\' fuer Zentral-Telegramme existiert nicht!<br><br>Werde die Default-Datei verwenden...").arg(filename));
|
||||
@@ -557,7 +556,7 @@ void LogViewGui::loadSpecificationFiles()
|
||||
|
||||
defString = QCoreApplication::applicationDirPath() + QLatin1String("/zsksxd_tetraForLogView.x");
|
||||
filename = settings.value(LogViewOptionDialog::P5_FILENAME, defString).toString();
|
||||
INFO_LOG(m_logger) << "Load tetra-protocol spezification-file: " << filename.toStdString();
|
||||
INFO_LOG() << "Load tetra-protocol spezification-file: " << filename.toStdString();
|
||||
if (!QFile::exists(filename))
|
||||
{
|
||||
QMessageBox::warning(this, tr("LogView"), tr("Die Spezifikations-Datei \'%1\' fuer TETRA-Telegramme existiert nicht!<br><br>Werde die Default-Datei verwenden...").arg(filename));
|
||||
@@ -566,7 +565,7 @@ void LogViewGui::loadSpecificationFiles()
|
||||
|
||||
LogViewTelegram::tetraParser()->parseX_File(filename);
|
||||
|
||||
INFO_LOG(m_logger) << "Browse telegram-log-file";
|
||||
INFO_LOG() << "Browse telegram-log-file";
|
||||
newTelegramFile();
|
||||
}
|
||||
|
||||
@@ -636,7 +635,7 @@ void LogViewGui::updateLogfile()
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Error: " << e.what();
|
||||
WARNING_LOG() << "Error: " << e.what();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -716,7 +715,7 @@ void LogViewGui::readTelegramsFromLogFile(const QString& a_fileName, const qint6
|
||||
|
||||
if (!telegram->isValid())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Trying to read/parse unknown data from logfile '" << a_fileName
|
||||
ERROR_LOG() << "Trying to read/parse unknown data from logfile '" << a_fileName
|
||||
<< "' at position " << telegramFile.pos() - (telegramLength + sizeof(lh));
|
||||
continue;
|
||||
}
|
||||
@@ -729,7 +728,7 @@ void LogViewGui::readTelegramsFromLogFile(const QString& a_fileName, const qint6
|
||||
else
|
||||
{
|
||||
QMessageBox::warning(this, tr("Falsche Version"), tr("LogViewer kann Telegramm-Logs der Version %1 nicht einlesen").arg(lh.m_Version));
|
||||
ERROR_LOG(m_logger) << "Trying to read/parse unknown data from logfile '" << a_fileName
|
||||
ERROR_LOG() << "Trying to read/parse unknown data from logfile '" << a_fileName
|
||||
<< "' at position " << telegramFile.pos() - sizeof(lh);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,8 +122,6 @@ protected:
|
||||
QAction *m_reloadAction;
|
||||
QTimer *m_replayTimer;
|
||||
int m_currentReplayRow;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
protected:
|
||||
void readTelegramsFromLogFile(const QString& a_fileName, const qint64 a_filePos = 0);
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ LogViewInjectionThread::LogViewInjectionThread()
|
||||
, m_SendingPossible(false)
|
||||
, m_Socket(nullptr)
|
||||
, m_Timer(nullptr)
|
||||
, m_logger(getLogger("LogViewInjectionThread"))
|
||||
{
|
||||
|
||||
QSettings settings;
|
||||
@@ -96,7 +95,7 @@ void LogViewInjectionThread::tryToConnect()
|
||||
m_Timer->setInterval(3000);
|
||||
m_Timer->start();
|
||||
|
||||
INFO_LOG(m_logger) << "Try to connect to injection-server of TETRA-If (" << m_Hostname << ":" << m_Port << ")";
|
||||
INFO_LOG() << "Try to connect to injection-server of TETRA-If (" << m_Hostname << ":" << m_Port << ")";
|
||||
m_Socket->connectToHost(m_Hostname, m_Port);
|
||||
}
|
||||
|
||||
@@ -104,7 +103,7 @@ void LogViewInjectionThread::tryToConnect()
|
||||
|
||||
void LogViewInjectionThread::doConnect()
|
||||
{
|
||||
INFO_LOG(m_logger) << "LogView has successful connected to injection-server of TETRA-If";
|
||||
INFO_LOG() << "LogView has successful connected to injection-server of TETRA-If";
|
||||
m_SendingPossible = true;
|
||||
m_Timer->stop();
|
||||
emit updateStatus(QLatin1String(":/image/GreenLamp.png"),
|
||||
@@ -115,7 +114,7 @@ void LogViewInjectionThread::doConnect()
|
||||
|
||||
void LogViewInjectionThread::doDisconnect()
|
||||
{
|
||||
INFO_LOG(m_logger) << "LogView was disconnected from injection-server of TETRA-If";
|
||||
INFO_LOG() << "LogView was disconnected from injection-server of TETRA-If";
|
||||
m_SendingPossible = false;
|
||||
emit updateStatus(QLatin1String(":/image/RedLamp.png"),
|
||||
tr("LogView ist nicht mehr mit TETRA-If-Injection-Server (%1:%2) verbunden").arg(m_Hostname).arg(m_Port));
|
||||
@@ -126,10 +125,10 @@ void LogViewInjectionThread::doDisconnect()
|
||||
|
||||
void LogViewInjectionThread::sendTelegram(LogViewTelegram* a_telegram, const bool a_doSendAsCentralTelegram)
|
||||
{
|
||||
INFO_LOG(m_logger) << "inject " << (a_doSendAsCentralTelegram ? "central" : "Tetra") << " telegram";
|
||||
INFO_LOG() << "inject " << (a_doSendAsCentralTelegram ? "central" : "Tetra") << " telegram";
|
||||
if (!m_Socket || m_Socket->state() != QAbstractSocket::ConnectedState)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Try to write a telegramm but we are not connected";
|
||||
ERROR_LOG() << "Try to write a telegramm but we are not connected";
|
||||
return;
|
||||
}
|
||||
N_CoPrtCnv::CoPrtCnvInjectionHeader injectionHeader;
|
||||
|
||||
@@ -54,10 +54,6 @@ namespace N_LogView
|
||||
QTimer *m_Timer;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
protected:
|
||||
protected slots:
|
||||
void tryToConnect();
|
||||
|
||||
@@ -73,7 +73,6 @@ LogViewTelegram::LogViewTelegram(const LogViewTelegram &o)
|
||||
, m_data(o.m_data)
|
||||
, m_json(o.m_json)
|
||||
, m_TetraTelegram(nullptr)
|
||||
, m_logger(getLogger("LogViewTelegram"))
|
||||
{
|
||||
if (!m_data.isEmpty())
|
||||
m_TetraTelegram = new N_CoPrtCnv::CoPrtCnvRadioTelegram(m_data);
|
||||
@@ -101,7 +100,6 @@ LogViewTelegram::LogViewTelegram(const N_CoPrtCnv::CoPrtCnvLogHeader::E_CoPrtCnv
|
||||
, m_LogTime(0)
|
||||
, m_GpsTime(0)
|
||||
, m_TetraTelegram(nullptr)
|
||||
, m_logger(getLogger("LogViewTelegram"))
|
||||
{
|
||||
const uint32_t &waitTime = qgetenv("LogViewWaitTime").toUInt();
|
||||
if (waitTime > 0)
|
||||
@@ -145,7 +143,6 @@ LogViewTelegram::LogViewTelegram(const N_CoPrtCnv::CoPrtCnvLogHeader::E_CoPrtCnv
|
||||
, m_GpsTime(0)
|
||||
, m_data(a_telegramData)
|
||||
, m_TetraTelegram(nullptr)
|
||||
, m_logger(getLogger("LogViewTelegram"))
|
||||
{
|
||||
const uint32_t &waitTime = qgetenv("LogViewWaitTime").toUInt();
|
||||
if (waitTime > 0)
|
||||
@@ -620,7 +617,7 @@ void LogViewTelegram::resetOffset()
|
||||
m_ActOffset = START_OFFSET_CENTRAL;
|
||||
break;
|
||||
default:
|
||||
ERROR_LOG(m_logger) << "resetOffset is only for Central-Protocol implemented";
|
||||
ERROR_LOG() << "resetOffset is only for Central-Protocol implemented";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1003,7 +1000,7 @@ MemberInformation LogViewTelegram::memberFromStructInformation(const StructInfor
|
||||
|
||||
LogViewField* LogViewTelegram::getFieldTree(const QString& a_type, const QString& a_name, uint16_t a_arraySize, const LogViewXdrType* a_parentElement, const bool a_hasContent)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "a_type=" << a_type << " a_name=" << a_name << " a_arraySize=" << a_arraySize;
|
||||
DEBUG_LOG() << "a_type=" << a_type << " a_name=" << a_name << " a_arraySize=" << a_arraySize;
|
||||
const LogViewXdrElement* xdrElement = tetraParser()->getElement(a_type);
|
||||
if (!xdrElement)
|
||||
return nullptr;
|
||||
@@ -1041,7 +1038,7 @@ LogViewField* LogViewTelegram::getFieldTree(const QString& a_type, const QString
|
||||
int arraySize = child->getArraySize();
|
||||
if (0 == arraySize && !isScalar(child))
|
||||
{
|
||||
INFO_LOG(m_logger) << "dyn. array of struc";
|
||||
INFO_LOG() << "dyn. array of struc";
|
||||
arraySize = getDynArraySize(m_ActOffset);
|
||||
isDynArray = true;
|
||||
}
|
||||
@@ -1085,7 +1082,7 @@ LogViewField* LogViewTelegram::getFieldTree(const QString& a_type, const QString
|
||||
else
|
||||
{
|
||||
|
||||
INFO_LOG(m_logger) << "typedef dynamisch";
|
||||
INFO_LOG() << "typedef dynamisch";
|
||||
}
|
||||
maxArraySize = static_cast<const LogViewXdrType*>(xdrElement)->getMaxArraySize();
|
||||
while (xdrElement->getKind() != LogViewXdrElement::e_KindStandardType)
|
||||
@@ -1411,10 +1408,10 @@ LogViewField* LogViewTelegram::getContent(const LogViewXdrStandardType* a_standa
|
||||
const quint64 value = getUIntX(i*size+a_offset, size, byteOrder);
|
||||
if (8 == size) {
|
||||
field->addValue(QString::number(xdrToDouble(value)));
|
||||
INFO_LOG(m_logger) << "value=" << xdrToDouble(value);
|
||||
INFO_LOG() << "value=" << xdrToDouble(value);
|
||||
} else {
|
||||
field->addValue(QString::number(xdrToFloat(value)));
|
||||
INFO_LOG(m_logger) << "value=" << xdrToFloat(value);
|
||||
INFO_LOG() << "value=" << xdrToFloat(value);
|
||||
}
|
||||
}
|
||||
field->setIsRightAligned(true);
|
||||
@@ -1443,7 +1440,7 @@ LogViewField* LogViewTelegram::getContent(const LogViewXdrStandardType* a_standa
|
||||
break;
|
||||
|
||||
default:
|
||||
ERROR_LOG(m_logger) << "ValueKind " << a_standardType->getValueKind() << " not implemented!";
|
||||
ERROR_LOG() << "ValueKind " << a_standardType->getValueKind() << " not implemented!";
|
||||
break;
|
||||
}
|
||||
uint16_t sizeOfContent = arraySize * size;
|
||||
@@ -1615,7 +1612,7 @@ bool LogViewTelegram::isScalar(const LogViewXdrType* a_xdrType) const
|
||||
|
||||
|
||||
default:
|
||||
ERROR_LOG(m_logger) << "name=" << xdrElement->getName().toStdString() << " kind=" << xdrElement->getKind() << " case not implemented!";
|
||||
ERROR_LOG() << "name=" << xdrElement->getName().toStdString() << " kind=" << xdrElement->getKind() << " case not implemented!";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -362,10 +362,6 @@ namespace N_LogView
|
||||
uint8_t getData(const uint16_t a_offset) const;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
friend class LogViewTabWidget;
|
||||
|
||||
};
|
||||
|
||||
@@ -49,7 +49,6 @@ namespace N_LogView
|
||||
LogViewTelegramDialog::LogViewTelegramDialog(QWidget *a_parent, const bool a_readonly)
|
||||
: QDialog(a_parent)
|
||||
, m_ReadOnly(a_readonly)
|
||||
, m_logger(getLogger("LogViewTelegramDialog"))
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
}
|
||||
@@ -229,7 +228,7 @@ void LogViewTelegramDialog::showTree(LogViewField *a_fieldTree, QGridLayout *a_b
|
||||
|
||||
void LogViewTelegramDialog::fillTelegram(LogViewTelegram *a_telegram)
|
||||
{
|
||||
INFO_LOG(m_logger) << "******************************************";
|
||||
INFO_LOG() << "******************************************";
|
||||
|
||||
|
||||
|
||||
@@ -237,7 +236,7 @@ void LogViewTelegramDialog::fillTelegram(LogViewTelegram *a_telegram)
|
||||
{
|
||||
if (!ptr->isValid())
|
||||
{
|
||||
INFO_LOG(m_logger) << ptr->field()->name() << " is invalid";
|
||||
INFO_LOG() << ptr->field()->name() << " is invalid";
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -388,7 +387,7 @@ void LogViewTelegramDialog::showEditField(LogViewField *a_logViewField, QGridLay
|
||||
if (w)
|
||||
a_box->addWidget(w, a_box->rowCount() - 1, 1);
|
||||
else
|
||||
WARNING_LOG(m_logger) << "Internal error - LogViewWidget is not derived from QWidget... !?";
|
||||
WARNING_LOG() << "Internal error - LogViewWidget is not derived from QWidget... !?";
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -69,9 +69,6 @@ private:
|
||||
QLineEdit *m_NameEdit = nullptr;
|
||||
QLineEdit *m_WaitTimeEdit = nullptr;
|
||||
bool m_ReadOnly = false;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
@@ -57,7 +57,6 @@ TelegramEdit::TelegramEdit(QWidget *parent)
|
||||
, m_DoLoop(false)
|
||||
, m_InjectionThread(nullptr)
|
||||
, m_EditModel(new TelegramEditModel(this))
|
||||
, m_logger(getLogger("LogViewTelegramEdit"))
|
||||
{
|
||||
m_addTeleAction->setShortcut(tr("Ctrl+A"));
|
||||
m_editTeleAction->setShortcut(tr("Ctrl+E"));
|
||||
@@ -300,12 +299,12 @@ void TelegramEdit::injectTelegram(const QSharedPointer<LogViewTelegram> &a_teleg
|
||||
{
|
||||
if (!isInjectionPossible())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Try to inject a telegramm but the injection thread is not running";
|
||||
WARNING_LOG() << "Try to inject a telegramm but the injection thread is not running";
|
||||
return;
|
||||
}
|
||||
if (a_telegram.isNull())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Try to inject a telegramm but no telegramm selected";
|
||||
WARNING_LOG() << "Try to inject a telegramm but no telegramm selected";
|
||||
return;
|
||||
}
|
||||
a_telegram->actualizeGpsTime();
|
||||
@@ -546,7 +545,7 @@ void TelegramEdit::loadTelegramList(bool checkAppend)
|
||||
stream >> waitTime >> name >> gpsFieldOffset >> telegramSize;
|
||||
if (telegramSize > 0)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "telegramSize=" << telegramSize;
|
||||
DEBUG_LOG() << "telegramSize=" << telegramSize;
|
||||
QByteArray buf(telegramSize, Qt::Uninitialized);
|
||||
stream.readRawData(buf.data(), telegramSize);
|
||||
NGL::NGLLoggerHelper::hexDumpHelper(m_logger, NGL::LogLevel::Debug, buf);
|
||||
|
||||
@@ -60,9 +60,6 @@ protected:
|
||||
int m_curEditTelegramRow;
|
||||
|
||||
TelegramEditModel *m_EditModel;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
static QString s_DIR();
|
||||
static QString s_EDIT_TELEGRAM_GROUP();
|
||||
static QString s_TELEGRAMLIST_FILE_ID();
|
||||
|
||||
@@ -80,7 +80,7 @@ bool LogViewTetraTelegramsParser::parse(const QString &filename)
|
||||
QFile f(filename);
|
||||
if (!f.open(QIODevice::ReadOnly))
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Can not open file " << filename << " for reading: " << f.errorString();
|
||||
WARNING_LOG() << "Can not open file " << filename << " for reading: " << f.errorString();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ int LogViewTetraTelegramsParser::parseStruct(const QVector<QStringRef> &lines, i
|
||||
{
|
||||
if (tokens.at(2) != QLatin1String(":"))
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Could not parse struct: '" << lines.at(iStartPos).toString() << "', line: " << iStartPos + 1;
|
||||
WARNING_LOG() << "Could not parse struct: '" << lines.at(iStartPos).toString() << "', line: " << iStartPos + 1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ int LogViewTetraTelegramsParser::parseStruct(const QVector<QStringRef> &lines, i
|
||||
{
|
||||
if (!si.baseStruct.isEmpty())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Could not parse struct: '" << lines.at(iStartPos).toString() << "', line: " << iStartPos + 1;
|
||||
WARNING_LOG() << "Could not parse struct: '" << lines.at(iStartPos).toString() << "', line: " << iStartPos + 1;
|
||||
return -1;
|
||||
}
|
||||
QStringRef base = tokens.at(i);
|
||||
@@ -205,13 +205,13 @@ int LogViewTetraTelegramsParser::parseStruct(const QVector<QStringRef> &lines, i
|
||||
if (tokens.size() > parserCommentPos)
|
||||
{
|
||||
const QStringRef &comment = tokens.at(parserCommentPos);
|
||||
DEBUG_LOG(m_logger) << "comment: " << comment.toString();
|
||||
DEBUG_LOG() << "comment: " << comment.toString();
|
||||
if (comment.startsWith(QLatin1String("//@array: ")))
|
||||
{
|
||||
const QStringRef hint = comment.mid(QLatin1String("//@array: ").size());
|
||||
QString structStr = QLatin1String("struct ") + si.type + QLatin1String("::") + tokens.at(0).toString() + QLatin1Char('\n') + hint.toString();
|
||||
structStr.replace(QLatin1Char(';'), QLatin1String(";\n"));
|
||||
DEBUG_LOG(m_logger) << "structStr: " << structStr;
|
||||
DEBUG_LOG() << "structStr: " << structStr;
|
||||
parseStruct(structStr.splitRef(QLatin1Char('\n')), 0);
|
||||
|
||||
mi.type = si.type + QLatin1String("::") + tokens.at(0).toString();
|
||||
@@ -250,13 +250,13 @@ int LogViewTetraTelegramsParser::parseStruct(const QVector<QStringRef> &lines, i
|
||||
if (m_logger.isDebugEnabled())
|
||||
{
|
||||
if (si.baseStruct.isEmpty())
|
||||
DEBUG_LOG(m_logger) << "Found Struct: " << si.type;
|
||||
DEBUG_LOG() << "Found Struct: " << si.type;
|
||||
else
|
||||
DEBUG_LOG(m_logger) << "Found Struct: " << si.type << ", base: " << si.baseStruct;
|
||||
DEBUG_LOG() << "Found Struct: " << si.type << ", base: " << si.baseStruct;
|
||||
for (int j = 0; j < si.member.size(); ++j)
|
||||
{
|
||||
const MemberInformation &mi = si.member.at(j);
|
||||
DEBUG_LOG(m_logger) << "Member[" << j << "]: " << mi.type << " - " << mi.name;
|
||||
DEBUG_LOG() << "Member[" << j << "]: " << mi.type << " - " << mi.name;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,7 +312,7 @@ int LogViewTetraTelegramsParser::parseEnum(const QVector<QStringRef> &lines, int
|
||||
si->member.push_back(std::move(mi));
|
||||
break;
|
||||
}
|
||||
WARNING_LOG(m_logger) << "Could not parse enum: '" << lines.at(i).toString() << "', line: " << i + 1;
|
||||
WARNING_LOG() << "Could not parse enum: '" << lines.at(i).toString() << "', line: " << i + 1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -334,9 +334,9 @@ int LogViewTetraTelegramsParser::parseEnum(const QVector<QStringRef> &lines, int
|
||||
++i;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "Found Enum: " << ei.type;
|
||||
DEBUG_LOG() << "Found Enum: " << ei.type;
|
||||
for (const EnumValue &ev : std::as_const(ei.values))
|
||||
DEBUG_LOG(m_logger) << "Member[" << i << "]: " << ev.key << " = " << ev.value;
|
||||
DEBUG_LOG() << "Member[" << i << "]: " << ev.key << " = " << ev.value;
|
||||
|
||||
if (ei.type == QLatin1String("TelegramId"))
|
||||
m_telegramIdEnum = ei;
|
||||
@@ -351,18 +351,18 @@ int LogViewTetraTelegramsParser::parseConstraint(const QVector<QStringRef> &line
|
||||
const QVector<QStringRef> tokens = tokenize(lines.at(iStartPos));
|
||||
if (tokens.size() != 4)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Could not parse constraint: '" << lines.at(iStartPos).toString() << "'";
|
||||
WARNING_LOG() << "Could not parse constraint: '" << lines.at(iStartPos).toString() << "'";
|
||||
return -1;
|
||||
}
|
||||
const QStringRef &cs = tokens.at(3);
|
||||
if (!cs.startsWith(QLatin1String("Constraints<")) || !cs.endsWith(QLatin1Char('>')))
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Could not parse constraint: '" << lines.at(iStartPos).toString() << "'";
|
||||
WARNING_LOG() << "Could not parse constraint: '" << lines.at(iStartPos).toString() << "'";
|
||||
return -1;
|
||||
}
|
||||
QStringRef structName = cs.mid(QLatin1String("Constraints<").size());
|
||||
structName.chop(1);
|
||||
DEBUG_LOG(m_logger) << "Constraint: " << structName.toString();
|
||||
DEBUG_LOG() << "Constraint: " << structName.toString();
|
||||
|
||||
int i = iStartPos + 1;
|
||||
while (i < lines.size())
|
||||
@@ -384,7 +384,7 @@ int LogViewTetraTelegramsParser::parseConstraint(const QVector<QStringRef> &line
|
||||
const QVector<QStringRef> parts = tokens.at(6).split(QLatin1String("::"));
|
||||
if (parts.size() != 2)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Could not parse constraint: '" << lines.at(i).toString() << "'";
|
||||
WARNING_LOG() << "Could not parse constraint: '" << lines.at(i).toString() << "'";
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -403,7 +403,7 @@ int LogViewTetraTelegramsParser::parseConstraint(const QVector<QStringRef> &line
|
||||
}
|
||||
if (!bFound)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Could not find enum value '" << enumKey.toString() << "' in enum TelegramId";
|
||||
WARNING_LOG() << "Could not find enum value '" << enumKey.toString() << "' in enum TelegramId";
|
||||
return -1;
|
||||
}
|
||||
++i;
|
||||
@@ -461,7 +461,7 @@ QVector<QStringRef> LogViewTetraTelegramsParser::tokenize(const QStringRef &line
|
||||
break;
|
||||
const QStringRef &lastToken = ret.last();
|
||||
const QStringRef newToken = QStringRef(token.string(), token.position(), lastToken.position() - token.position() + lastToken.size());
|
||||
DEBUG_LOG(m_logger) << "New Token: " << newToken.toString();
|
||||
DEBUG_LOG() << "New Token: " << newToken.toString();
|
||||
ret.resize(i + 1);
|
||||
ret[i] = newToken;
|
||||
break;
|
||||
@@ -478,7 +478,7 @@ QVector<QStringRef> LogViewTetraTelegramsParser::tokenize(const QStringRef &line
|
||||
}
|
||||
const QStringRef &nextToken = ret.at(i + 1);
|
||||
const QStringRef newToken = QStringRef(token.string(), token.position(), nextToken.position() - token.position() + nextToken.size());
|
||||
DEBUG_LOG(m_logger) << "New Token: " << newToken.toString();
|
||||
DEBUG_LOG() << "New Token: " << newToken.toString();
|
||||
ret.removeAt(i + 1);
|
||||
ret[i] = newToken;
|
||||
}
|
||||
|
||||
@@ -84,6 +84,5 @@ private:
|
||||
QHash<QString, StructInformation> m_structs;
|
||||
QHash<QString, PodInformation> m_pods;
|
||||
QHash<int, QString> m_visibleTelegrams;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
}
|
||||
@@ -30,7 +30,6 @@ LogViewWidget::LogViewWidget(LogViewField* a_field, QWidget* a_widget, QWidget*
|
||||
, m_Widget(a_widget)
|
||||
, m_Field(a_field)
|
||||
, m_Parent(a_parent)
|
||||
, m_logger(getLogger("LogViewWidget"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -115,7 +114,7 @@ void LogViewWidget::updateToolTip(const QString &a_text)
|
||||
break;
|
||||
}
|
||||
default:
|
||||
ERROR_LOG(m_logger) << "Case not implemented";
|
||||
ERROR_LOG() << "Case not implemented";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -77,8 +77,6 @@ protected:
|
||||
LogViewField *m_Field;
|
||||
|
||||
QWidget *m_Parent;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
@@ -25,13 +25,13 @@ LogViewXdrElement::LogViewXdrElement(const QString& a_name, const E_ElementKind
|
||||
, 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";
|
||||
ERROR_LOG() << "Element \'" << a_name.toStdString() << "\' has a problem";
|
||||
}
|
||||
|
||||
|
||||
void LogViewXdrElement::dump() const
|
||||
{
|
||||
INFO_LOG(m_logger) << "Element[" << getName() << "]: kind=" << getKindName();
|
||||
INFO_LOG() << "Element[" << getName() << "]: kind=" << getKindName();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -54,9 +54,6 @@ namespace N_LogView
|
||||
QString m_Name;
|
||||
E_ElementKind m_Kind;
|
||||
QString getKindName() const;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
@@ -37,7 +37,6 @@ LogViewXdrParser::LogViewXdrParser()
|
||||
, m_WordListIndex(0)
|
||||
, m_ActElement(nullptr)
|
||||
, m_State(e_ParseMain)
|
||||
, m_logger(getLogger("LogViewXdrParser"))
|
||||
{}
|
||||
|
||||
LogViewXdrParser::~LogViewXdrParser()
|
||||
@@ -389,7 +388,7 @@ void LogViewXdrParser::parseEnum(const QString &a_line, const uint16_t a_enumSiz
|
||||
if (ok)
|
||||
m_ActElement->addElement(name, value, LogViewXdrElement::e_KindEnumElement);
|
||||
else
|
||||
ERROR_LOG(m_logger) << "Problem with converting text to number: name=" << name.toStdString() << " valueText=" << valueText.toStdString();
|
||||
ERROR_LOG() << "Problem with converting text to number: name=" << name.toStdString() << " valueText=" << valueText.toStdString();
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -462,7 +461,7 @@ void LogViewXdrParser::parseStruct(const QString &a_line)
|
||||
uint16_t dynArrayOffset;
|
||||
uint16_t arraySize = parseArray(name, dynArrayOffset);
|
||||
if(firstBit >= 0)
|
||||
DEBUG_LOG(m_logger) << "Add Element " << name
|
||||
DEBUG_LOG() << "Add Element " << name
|
||||
<< " with type " << type
|
||||
<< " array size: " << arraySize
|
||||
<< " first:last " << firstBit << ":" << lastBit
|
||||
@@ -684,7 +683,7 @@ int64_t LogViewXdrParser::calcValue(const QString& a_calcText, bool& a_isOk)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ERROR_LOG(m_logger) << "Problem with converting '" << a_calcText << "' to integer";
|
||||
ERROR_LOG() << "Problem with converting '" << a_calcText << "' to integer";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -174,10 +174,6 @@ namespace N_LogView
|
||||
bool addToElementMap(const QString& a_name, LogViewXdrElement* a_element);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user