TetraIF migration and Unittest Implementation for it
Entire-Checkpoint: 14d1fef0cf36
This commit is contained in:
1 parent
a86f9b5bac
commit
ba212f9dce
78 files changed
+1611
-640
No files matched your search
@@ -50,6 +50,7 @@ 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);
|
||||
}
|
||||
@@ -139,7 +140,7 @@ void LogViewTelegramDialog::showDataDump(const QSharedPointer<LogViewTelegram> &
|
||||
layout->addWidget(new QLabel(tr("HexData from \'%1\' - telegram:").arg(a_telegram->getName())));
|
||||
|
||||
|
||||
QString theDump = QLatin1String("<code>");
|
||||
QString theDump = QStringLiteral("<code>");
|
||||
const QByteArray &data = a_telegram->getData();
|
||||
for (int i = 0; i < data.size(); i++)
|
||||
{
|
||||
@@ -148,13 +149,13 @@ void LogViewTelegramDialog::showDataDump(const QSharedPointer<LogViewTelegram> &
|
||||
|
||||
theDump += QStringLiteral(" %1").arg(static_cast<unsigned char>(data[i]), 2, 16, QLatin1Char('0'));
|
||||
if (7 == (i % 8))
|
||||
theDump += QLatin1String("<br>");
|
||||
theDump += QStringLiteral("<br>");
|
||||
}
|
||||
theDump += QLatin1String("</code>");
|
||||
theDump += QStringLiteral("</code>");
|
||||
|
||||
QTextEdit *telegramDump = new QTextEdit(theDump);
|
||||
layout->addWidget(telegramDump);
|
||||
QPushButton *btnClose = new QPushButton(QIcon(QLatin1String(":icons/16x16/edit-delete.png")), tr("&Schliessen"));
|
||||
QPushButton *btnClose = new QPushButton(QIcon(QStringLiteral(":icons/16x16/edit-delete.png")), tr("&Schliessen"));
|
||||
QHBoxLayout *btnLayout = new QHBoxLayout;
|
||||
btnLayout->addStretch();
|
||||
btnLayout->addWidget(btnClose);
|
||||
@@ -282,7 +283,7 @@ void LogViewTelegramDialog::showButtons(QLayout *a_layout)
|
||||
{
|
||||
if (N_CoPrtCnv::CoPrtCnvLogHeader::e_DestProtocolCentral == m_Telegram->getProtocol())
|
||||
{
|
||||
QPushButton *btnSend = new QPushButton(QIcon(QLatin1String(":icons/16x16/mail-send.png")), tr("&Send"));
|
||||
QPushButton *btnSend = new QPushButton(QIcon(QStringLiteral(":icons/16x16/mail-send.png")), tr("&Send"));
|
||||
btnSend->setEnabled(true);
|
||||
connect(btnSend, &QPushButton::clicked, this, &LogViewTelegramDialog::sendCurrentTelegram);
|
||||
a_layout->addWidget(btnSend);
|
||||
@@ -290,18 +291,18 @@ void LogViewTelegramDialog::showButtons(QLayout *a_layout)
|
||||
|
||||
if (m_ReadOnly)
|
||||
{
|
||||
QPushButton *btnClose = new QPushButton(QIcon(QLatin1String(":icons/16x16/edit-delete.png")), tr("&Schliessen"));
|
||||
QPushButton *btnClose = new QPushButton(QIcon(QStringLiteral(":icons/16x16/edit-delete.png")), tr("&Schliessen"));
|
||||
connect(btnClose, &QPushButton::clicked, this, &LogViewTelegramDialog::reject);
|
||||
a_layout->addWidget(btnClose);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
QPushButton *btnClose = new QPushButton(QIcon(QLatin1String(":icons/16x16/edit-delete.png")), tr("&Abbrechen"));
|
||||
QPushButton *btnClose = new QPushButton(QIcon(QStringLiteral(":icons/16x16/edit-delete.png")), tr("&Abbrechen"));
|
||||
connect(btnClose, &QPushButton::clicked, this, &LogViewTelegramDialog::reject);
|
||||
a_layout->addWidget(btnClose);
|
||||
|
||||
QPushButton *btnOk = new QPushButton(QIcon(QLatin1String(":icons/16x16/dialog-ok-apply.png")), tr("&OK"));
|
||||
QPushButton *btnOk = new QPushButton(QIcon(QStringLiteral(":icons/16x16/dialog-ok-apply.png")), tr("&OK"));
|
||||
btnOk->setDefault(true);
|
||||
|
||||
connect(btnOk, &QPushButton::clicked, this, &LogViewTelegramDialog::saveTelegram);
|
||||
@@ -392,7 +393,7 @@ void LogViewTelegramDialog::showEditField(LogViewField *a_logViewField, QGridLay
|
||||
break;
|
||||
}
|
||||
|
||||
Q_FALLTHROUGH();
|
||||
[[fallthrough]];
|
||||
case 0:
|
||||
if (m_ReadOnly)
|
||||
{
|
||||
@@ -401,7 +402,7 @@ void LogViewTelegramDialog::showEditField(LogViewField *a_logViewField, QGridLay
|
||||
break;
|
||||
}
|
||||
|
||||
Q_FALLTHROUGH();
|
||||
[[fallthrough]];
|
||||
default:
|
||||
{
|
||||
|
||||
|
||||
Reference in new issue
Block a user