summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtVCardWidget/QtVCardAddressField.cpp')
-rw-r--r--Swift/QtUI/QtVCardWidget/QtVCardAddressField.cpp34
1 files changed, 22 insertions, 12 deletions
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardAddressField.cpp b/Swift/QtUI/QtVCardWidget/QtVCardAddressField.cpp
index d9bb4fe..f394af0 100644
--- a/Swift/QtUI/QtVCardWidget/QtVCardAddressField.cpp
+++ b/Swift/QtUI/QtVCardWidget/QtVCardAddressField.cpp
@@ -139,18 +139,28 @@ VCard::Address QtVCardAddressField::getAddress() const {
void QtVCardAddressField::handleEditibleChanged(bool isEditable) {
- if (streetLineEdit) streetLineEdit->setEditable(isEditable);
- if (poboxLineEdit) poboxLineEdit->setEditable(isEditable);
- if (addressextLineEdit) addressextLineEdit->setEditable(isEditable);
- if (cityLineEdit) cityLineEdit->setEditable(isEditable);
- if (pocodeLineEdit) pocodeLineEdit->setEditable(isEditable);
- if (regionLineEdit) regionLineEdit->setEditable(isEditable);
- if (countryLineEdit) countryLineEdit->setEditable(isEditable);
-
- if (deliveryTypeLabel) {
+ assert(streetLineEdit);
+ assert(poboxLineEdit);
+ assert(addressextLineEdit);
+ assert(cityLineEdit);
+ assert(pocodeLineEdit);
+ assert(regionLineEdit);
+ assert(countryLineEdit);
+ assert(deliveryTypeLabel);
+ assert(domesticRadioButton);
+ assert(internationalRadioButton);
+
+ streetLineEdit->setEditable(isEditable);
+ poboxLineEdit->setEditable(isEditable);
+ addressextLineEdit->setEditable(isEditable);
+ cityLineEdit->setEditable(isEditable);
+ pocodeLineEdit->setEditable(isEditable);
+ regionLineEdit->setEditable(isEditable);
+ countryLineEdit->setEditable(isEditable);
+
deliveryTypeLabel->setText(buttonGroup->checkedButton() == 0 ? "" : buttonGroup->checkedButton()->text());
deliveryTypeLabel->setVisible(!isEditable);
- }
- if (domesticRadioButton) domesticRadioButton->setVisible(isEditable);
- if (internationalRadioButton) internationalRadioButton->setVisible(isEditable);
+
+ domesticRadioButton->setVisible(isEditable);
+ internationalRadioButton->setVisible(isEditable);
foreach (QWidget* widget, textFields) {