Signal: Fix index variable declaration
authorSoeren Apel <soeren@apelpie.net>
Sat, 27 Jun 2015 11:33:59 +0000 (13:33 +0200)
committerSoeren Apel <soeren@apelpie.net>
Sat, 27 Jun 2015 11:33:59 +0000 (13:33 +0200)
pv/view/signal.cpp

index 018b68f218fbbb3ae2bdac17c21e9c853ca23538..9f97d5bca7194562f40d4939b77e47f46e19502b 100644 (file)
@@ -101,8 +101,6 @@ shared_ptr<Channel> Signal::channel() const
 
 void Signal::populate_popup_form(QWidget *parent, QFormLayout *form)
 {
-       int index;
-
        name_widget_ = new QComboBox(parent);
        name_widget_->setEditable(true);
        name_widget_->setCompleter(0);
@@ -110,7 +108,7 @@ void Signal::populate_popup_form(QWidget *parent, QFormLayout *form)
        for(unsigned int i = 0; i < countof(ChannelNames); i++)
                name_widget_->insertItem(i, ChannelNames[i]);
 
-       index = name_widget_->findText(name_, Qt::MatchExactly);
+       const int index = name_widget_->findText(name_, Qt::MatchExactly);
 
        if (index == -1) {
                name_widget_->insertItem(0, name_);