diff --git a/GUI/Model/Descriptor/ComboProperty.cpp b/GUI/Model/Descriptor/ComboProperty.cpp index f785887338e4692f27daaded56c0341fb103e1d6..cb17abc200025f9d58c34a78ecb5163b645478a6 100644 --- a/GUI/Model/Descriptor/ComboProperty.cpp +++ b/GUI/Model/Descriptor/ComboProperty.cpp @@ -136,17 +136,6 @@ QVariant ComboProperty::variant() const return result; } -//! Returns vector of selected indices. -//! Returns list of string with selected values; - -QStringList ComboProperty::selectedValues() const -{ - QStringList result; - for (auto index : m_selected_indices) - result.append(m_values.at(index)); - return result; -} - //! Sets given index selection flag. //! If false, index will be excluded from selection. diff --git a/GUI/Model/Descriptor/ComboProperty.h b/GUI/Model/Descriptor/ComboProperty.h index 56f5e19401c52654f73c3e3d47f0f61043e3182b..69cb583165d28f313b1b858d3aeb307fbe028a85 100644 --- a/GUI/Model/Descriptor/ComboProperty.h +++ b/GUI/Model/Descriptor/ComboProperty.h @@ -52,7 +52,6 @@ public: QVariant variant() const; QVector<int> selectedIndices() const { return m_selected_indices; } - QStringList selectedValues() const; void setSelected(int index, bool value = true); void setSelected(const QString& name, bool value = true); diff --git a/Tests/Unit/GUI/TestComboProperty.cpp b/Tests/Unit/GUI/TestComboProperty.cpp index 31fc32cbdb40a0ac06ff09db8700a85fe7b3af97..5c2d2842a08b1d0faae26cede8fa89cf1fd8df39 100644 --- a/Tests/Unit/GUI/TestComboProperty.cpp +++ b/Tests/Unit/GUI/TestComboProperty.cpp @@ -104,21 +104,18 @@ TEST_F(TestComboProperty, selectedIndices) EXPECT_EQ(combo.currentIndex(), 0); EXPECT_EQ(combo.currentValue(), "a1"); EXPECT_EQ(combo.selectedIndices(), QVector<int>({0})); - EXPECT_EQ(combo.selectedValues(), QStringList({"a1"})); // selecting already selected element, nothing should change combo.setSelected(0); EXPECT_EQ(combo.currentIndex(), 0); EXPECT_EQ(combo.currentValue(), "a1"); EXPECT_EQ(combo.selectedIndices(), QVector<int>({0})); - EXPECT_EQ(combo.selectedValues(), QStringList({"a1"})); // deselecting index combo.setSelected(0, false); EXPECT_EQ(combo.currentIndex(), -1); EXPECT_EQ(combo.currentValue(), ""); EXPECT_EQ(combo.selectedIndices(), QVector<int>()); - EXPECT_EQ(combo.selectedValues(), QStringList()); // selecting two indeces combo.setSelected(1, true); @@ -126,7 +123,6 @@ TEST_F(TestComboProperty, selectedIndices) EXPECT_EQ(combo.currentIndex(), 1); EXPECT_EQ(combo.currentValue(), "a2"); EXPECT_EQ(combo.selectedIndices(), QVector<int>({1, 2})); - EXPECT_EQ(combo.selectedValues(), QStringList({"a2", "a3"})); // selecting by name combo.setSelected("a2", false); @@ -134,7 +130,6 @@ TEST_F(TestComboProperty, selectedIndices) EXPECT_EQ(combo.currentIndex(), 0); EXPECT_EQ(combo.currentValue(), "a1"); EXPECT_EQ(combo.selectedIndices(), QVector<int>({0, 2})); - EXPECT_EQ(combo.selectedValues(), QStringList({"a1", "a3"})); } TEST_F(TestComboProperty, comboEquality)