apply some code analyzer recommendations
This commit is contained in:
@@ -20,7 +20,7 @@ ConnectionEdit::ConnectionEdit(QWidget * parent): QDialog(parent) {
|
||||
conn = 0;
|
||||
PICodeInfo::EnumInfo * ei = PICODEINFO::enums().value("PIIODevice::DeviceMode");
|
||||
if (ei) {
|
||||
piForeachC(PICodeInfo::EnumeratorInfo & e, ei->members)
|
||||
for (const auto & e: ei->members)
|
||||
#if PIP_VERSION >= PIP_MAKE_VERSION(2, 39, 0)
|
||||
ui->comboMode->addItem(PI2QString(e.name.toString() + " (" + PIString::fromNumber(e.value) + ")"),
|
||||
QVariant::fromValue<int>(e.value));
|
||||
@@ -31,7 +31,7 @@ ConnectionEdit::ConnectionEdit(QWidget * parent): QDialog(parent) {
|
||||
ui->comboMode->setCurrentIndex(ui->comboMode->count() - 1);
|
||||
ei = PICODEINFO::enums().value("PIIODevice::DeviceOption");
|
||||
if (ei) {
|
||||
piForeachC(PICodeInfo::EnumeratorInfo & e, ei->members) {
|
||||
for (const auto & e: ei->members) {
|
||||
QCheckBox * cb = new QCheckBox();
|
||||
#if PIP_VERSION >= PIP_MAKE_VERSION(2, 39, 0)
|
||||
cb->setText(PI2QString(e.name.toString() + " (" + PIString::fromNumber(e.value) + ")"));
|
||||
@@ -44,7 +44,7 @@ ConnectionEdit::ConnectionEdit(QWidget * parent): QDialog(parent) {
|
||||
}
|
||||
ei = PICODEINFO::enums().value("PIPacketExtractor::SplitMode");
|
||||
if (ei) {
|
||||
piForeachC(PICodeInfo::EnumeratorInfo & e, ei->members)
|
||||
for (const auto & e: ei->members)
|
||||
#if PIP_VERSION >= PIP_MAKE_VERSION(2, 39, 0)
|
||||
ui->comboSplit->addItem(PI2QString(e.name.toString() + " (" + PIString::fromNumber(e.value) + ")"),
|
||||
QVariant::fromValue<int>(e.value));
|
||||
|
||||
Reference in New Issue
Block a user