From 57e3714db45920287118dddb9bc5d9df691110ec Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Tue, 19 May 2015 17:36:16 +0200 Subject: [PATCH] JsonWizard: Remove member that is only ever read Change-Id: I87529de8fb600dfc08862143f708e445bc18ed47 Reviewed-by: Tobias Hunger --- src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp | 8 ++------ src/plugins/projectexplorer/jsonwizard/jsonfieldpage.h | 1 - 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp b/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp index 41973168a48..b901071c222 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp +++ b/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp @@ -673,7 +673,7 @@ void JsonFieldPage::CheckBoxField::initializeData(MacroExpander *expander) // -------------------------------------------------------------------- JsonFieldPage::ComboBoxField::ComboBoxField() : - m_index(-1), m_disabledIndex(-1), m_savedIndex(-1), m_currentIndex(-1) + m_index(-1), m_disabledIndex(-1), m_savedIndex(-1) { } QPair parseComboBoxItem(const QVariant &item, QString *errorMessage) @@ -792,10 +792,7 @@ void JsonFieldPage::ComboBoxField::initializeData(MacroExpander *expander) w->setItems(tmpItems, tmpData); w->setInsertPolicy(QComboBox::NoInsert); - if (m_currentIndex >= 0) - w->setCurrentIndex(m_currentIndex); - else - w->setCurrentIndex(m_index); + w->setCurrentIndex(m_index); } // -------------------------------------------------------------------- @@ -839,7 +836,6 @@ bool JsonFieldPage::setup(const QVariant &data) f->createWidget(this); m_fields.append(f); } - return true; } diff --git a/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.h b/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.h index 3237e152531..92090c62e02 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.h +++ b/src/plugins/projectexplorer/jsonwizard/jsonfieldpage.h @@ -239,7 +239,6 @@ public: int m_disabledIndex; mutable int m_savedIndex; - int m_currentIndex; }; JsonFieldPage(Utils::MacroExpander *expander, QWidget *parent = 0);