////////////////// Slots ///////////////////////
| 99 | |
| 100 | /////////////////////// Slots /////////////////////// |
| 101 | void |
| 102 | AddTLESourceDialog::onFieldsChanged(void) |
| 103 | { |
| 104 | bool isValid = false; |
| 105 | |
| 106 | if (this->ui->nameEdit->text().isEmpty()) { |
| 107 | this->ui->nameEdit->setToolTip("Enter a non-empty string describing the source"); |
| 108 | this->ui->nameEdit->toolTip(); |
| 109 | } else if (!this->urlIsValid(this->ui->urlEdit->text())) { |
| 110 | this->ui->urlEdit->setToolTip("Enter a valid URL (starting by http:// or https://)"); |
| 111 | this->ui->urlEdit->toolTip(); |
| 112 | } else { |
| 113 | isValid = true; |
| 114 | } |
| 115 | |
| 116 | this->ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(isValid); |
| 117 | } |
nothing calls this directly
no test coverage detected