From 917aea688614bd29568f7eb37efe8cbd2620b25c Mon Sep 17 00:00:00 2001 From: senator Date: Mon, 24 Mar 2008 13:33:35 +0000 Subject: Fixed isValid for combobox and radiobuttons --- client/widgets/combobox.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'client/widgets/combobox.cc') diff --git a/client/widgets/combobox.cc b/client/widgets/combobox.cc index e60ea8e..29bf253 100644 --- a/client/widgets/combobox.cc +++ b/client/widgets/combobox.cc @@ -63,9 +63,14 @@ ComboBox::ComboBox(QDomNode node) if(default_found == 0) setCurrentIndex(-1); // -1 is default for none selected } +bool ComboBox::isValid() +{ + return currentIndex() != -1; +} + QString ComboBox::getValue() { - QString value = "none"; + QString value; if(currentIndex() != -1) value = itemData(currentIndex()).toString(); return value; } -- cgit v1.2.3