MCPcopy Create free account
hub / github.com/BatchDrake/SigDigger / onFieldsChanged

Method onFieldsChanged

Components/AddTLESourceDialog.cpp:101–117  ·  view source on GitHub ↗

////////////////// Slots ///////////////////////

Source from the content-addressed store, hash-verified

99
100/////////////////////// Slots ///////////////////////
101void
102AddTLESourceDialog::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}

Callers

nothing calls this directly

Calls 2

urlIsValidMethod · 0.95
setEnabledMethod · 0.45

Tested by

no test coverage detected