Migrates residual Lts sources to generated rtiddsgen API
Adds NmeaManagement tests, fixes codegen includes and Qt6 SerialPort CMake target.
This commit is contained in:
1 parent
5485a90385
commit
881d44f4dd
512 files changed
+6887
-6426
No files matched your search
+4
-4
@@ -87,8 +87,8 @@ void NotificationManagementDialog::onAcknowledgeNotification()
|
||||
|
||||
for (const auto &addr : noti.recipientIds())
|
||||
{
|
||||
if ((addr.addressType() == AddressType_def::Operator && addr.addressId() == operatorId)
|
||||
|| (addr.addressType() == AddressType_def::Workstation && addr.addressId() == workstationId))
|
||||
if ((addr.addressType() == AddressType::Operator && addr.addressId() == operatorId)
|
||||
|| (addr.addressType() == AddressType::Workstation && addr.addressId() == workstationId))
|
||||
{
|
||||
request.addressId(addr.id());
|
||||
break;
|
||||
@@ -145,8 +145,8 @@ void NotificationManagementDialog::onRemoveNotification()
|
||||
|
||||
for (const auto &addr : noti.recipientIds())
|
||||
{
|
||||
if ((addr.addressType() == AddressType_def::Operator && addr.addressId() == operatorId)
|
||||
|| (addr.addressType() == AddressType_def::Workstation && addr.addressId() == workstationId))
|
||||
if ((addr.addressType() == AddressType::Operator && addr.addressId() == operatorId)
|
||||
|| (addr.addressType() == AddressType::Workstation && addr.addressId() == workstationId))
|
||||
{
|
||||
request.addressId(addr.id());
|
||||
break;
|
||||
|
||||
+10
-10
@@ -70,10 +70,10 @@ QVariant NotificationManagementDialogModel::data(const QModelIndex &index, int r
|
||||
bool setBold = false;
|
||||
for (const auto &addr : noti.recipientIds())
|
||||
{
|
||||
if (addr.addressType() == AddressType_def::Operator && addr.addressId() != m_operatorId)
|
||||
if (addr.addressType() == AddressType::Operator && addr.addressId() != m_operatorId)
|
||||
continue;
|
||||
|
||||
if (addr.addressType() == AddressType_def::Workstation && addr.addressId() != m_workstationId)
|
||||
if (addr.addressType() == AddressType::Workstation && addr.addressId() != m_workstationId)
|
||||
continue;
|
||||
|
||||
if (!noti.processed())
|
||||
@@ -126,11 +126,11 @@ QVariant NotificationManagementDialogModel::data(const QModelIndex &index, int r
|
||||
{
|
||||
switch (noti.priority().underlying())
|
||||
{
|
||||
case NotificationManagement::Priority_def::Low:
|
||||
case NotificationManagement::Priority::Low:
|
||||
return QColor(Qt::black);
|
||||
case NotificationManagement::Priority_def::Normal:
|
||||
case NotificationManagement::Priority::Normal:
|
||||
return QColor(Qt::cyan);
|
||||
case NotificationManagement::Priority_def::High:
|
||||
case NotificationManagement::Priority::High:
|
||||
return QColor(Qt::magenta);
|
||||
case NotificationManagement::Priority::Highest:
|
||||
return QColor(Qt::red);
|
||||
@@ -152,10 +152,10 @@ bool NotificationManagementDialogModel::isFiltered(const NotificationManagement:
|
||||
bool isFiltered = true;
|
||||
for (const auto &addr : data.recipientIds())
|
||||
{
|
||||
if (addr.addressType() == AddressType_def::Workstation)
|
||||
if (addr.addressType() == AddressType::Workstation)
|
||||
if (addr.addressId() != m_workstationId)
|
||||
continue;
|
||||
if (addr.addressType() == AddressType_def::Operator)
|
||||
if (addr.addressType() == AddressType::Operator)
|
||||
if (addr.addressId() != m_operatorId)
|
||||
continue;
|
||||
|
||||
@@ -170,7 +170,7 @@ int NotificationManagementDialogModel::isDeleted(const NomNotification &data) co
|
||||
{
|
||||
for (const auto &addr : data.recipientIds())
|
||||
{
|
||||
if (addr.addressType() == AddressType_def::Operator)
|
||||
if (addr.addressType() == AddressType::Operator)
|
||||
{
|
||||
if (addr.addressId() != m_operatorId)
|
||||
continue;
|
||||
@@ -187,13 +187,13 @@ QString NotificationManagementDialogModel::getNameByAddressId(int addressId, con
|
||||
{
|
||||
if (addr.id() == addressId)
|
||||
{
|
||||
if (addr.addressType() == AddressType_def::Operator)
|
||||
if (addr.addressType() == AddressType::Operator)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "addressId=" << addressId
|
||||
<< ", addr.addressId()).name()=" << QString::fromStdString(m_dtcOpm->user(addr.addressId()).name());
|
||||
return QString::fromStdString(m_dtcOpm->user(addr.addressId()).name());
|
||||
}
|
||||
if (addr.addressType() == AddressType_def::Workstation)
|
||||
if (addr.addressType() == AddressType::Workstation)
|
||||
return QString::fromStdString(m_dtcAsm->asset(addr.addressId()).name());
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -39,7 +39,7 @@ int InterfaceImpl::isDeleted(const NomNotification &data) const
|
||||
int operatorId = LtsSessionData::LtsSessionData::getInstance()->getOperatorId();
|
||||
for (const auto &addr : data.recipientIds())
|
||||
{
|
||||
if (addr.addressType() == AddressType_def::Operator)
|
||||
if (addr.addressType() == AddressType::Operator)
|
||||
{
|
||||
if (addr.addressId() != operatorId)
|
||||
continue;
|
||||
@@ -342,8 +342,8 @@ void InterfaceImpl::ack(const NotificationManagement::NomNotification ¬ificat
|
||||
int workstationId = LtsSessionData::LtsSessionData::getInstance()->getWorkstationId();
|
||||
for (const auto &addr : notification.recipientIds())
|
||||
{
|
||||
if ((addr.addressType() == AddressType_def::Operator && addr.addressId() == operatorId)
|
||||
|| (addr.addressType() == AddressType_def::Workstation && addr.addressId() == workstationId))
|
||||
if ((addr.addressType() == AddressType::Operator && addr.addressId() == operatorId)
|
||||
|| (addr.addressType() == AddressType::Workstation && addr.addressId() == workstationId))
|
||||
{
|
||||
request.addressId(addr.id());
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user