Implemented WeatherSettingsWidget::isValid
This commit is contained in:
@@ -19,13 +19,15 @@ WeatherSettingsWidget::WeatherSettingsWidget(ZeiterfassungSettings &settings, QW
|
|||||||
|
|
||||||
bool WeatherSettingsWidget::isValid(QString &message) const
|
bool WeatherSettingsWidget::isValid(QString &message) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(message)
|
auto valid = QUrl::fromUserInput(m_lineEdit->text()).isValid();
|
||||||
|
|
||||||
qDebug() << "called";
|
if(!valid)
|
||||||
return true;
|
message = tr("The weather api url is invalid!");
|
||||||
|
|
||||||
|
return valid;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WeatherSettingsWidget::apply()
|
void WeatherSettingsWidget::apply()
|
||||||
{
|
{
|
||||||
qDebug() << "called";
|
m_settings.setUrl(QUrl::fromUserInput(m_lineEdit->text()));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user