]> sigrok.org Git - pulseview.git/blobdiff - pv/view/decodetrace.cpp
Use the 'default' keyword where applicable. This patch
[pulseview.git] / pv / view / decodetrace.cpp
index b2ead1a66848600e1ae11425fe874d708b73f39a..6bafa11e8c3a8d3ad2075fa0e7107fe51e073fdb 100644 (file)
@@ -199,9 +199,7 @@ void DecodeTrace::paint_mid(QPainter &p, const ViewItemPaintParams &pp)
        const vector<Row> rows(decoder_stack_->get_visible_rows());
 
        visible_rows_.clear();
-       for (auto i : rows) {
-               const Row &row = i;
-
+       for (const Row& row : rows) {
                // Cache the row title widths
                int row_title_width;
                try {
@@ -229,7 +227,7 @@ void DecodeTrace::paint_mid(QPainter &p, const ViewItemPaintParams &pp)
 
                        y += row_height_;
 
-                       visible_rows_.push_back(i);
+                       visible_rows_.push_back(row);
                }
        }
 
@@ -793,8 +791,8 @@ void DecodeTrace::create_decoder_form(int index,
                connect(combo, SIGNAL(currentIndexChanged(int)),
                        this, SLOT(on_channel_selected(int)));
                decoder_form->addRow(tr("<b>%1</b> (%2) *")
-                       .arg(QString::fromUtf8(pdch->name))
-                       .arg(QString::fromUtf8(pdch->desc)), combo);
+                       .arg(QString::fromUtf8(pdch->name),
+                            QString::fromUtf8(pdch->desc)), combo);
 
                const ChannelSelector s = {combo, dec, pdch};
                channel_selectors_.push_back(s);
@@ -808,8 +806,8 @@ void DecodeTrace::create_decoder_form(int index,
                connect(combo, SIGNAL(currentIndexChanged(int)),
                        this, SLOT(on_channel_selected(int)));
                decoder_form->addRow(tr("<b>%1</b> (%2)")
-                       .arg(QString::fromUtf8(pdch->name))
-                       .arg(QString::fromUtf8(pdch->desc)), combo);
+                       .arg(QString::fromUtf8(pdch->name),
+                            QString::fromUtf8(pdch->desc)), combo);
 
                const ChannelSelector s = {combo, dec, pdch};
                channel_selectors_.push_back(s);