Private(WeatherLocation *location)
: q(location),
locationEngine(nullptr),
- weatherEngine(nullptr)
+ weatherEngine(nullptr),
+ foundsource(false)
{
}
}
validators.remove(validator);
- if (!source.isEmpty()) {
+ if (!source.isEmpty() && !foundsource) {
+ foundsource = true;
emit q->finished(source);
}
- if (validators.isEmpty()) {
+ if (!foundsource && validators.isEmpty()) {
emit q->finished(QString());
}
}
WeatherLocation *q;
Plasma::DataEngine *locationEngine;
Plasma::DataEngine *weatherEngine;
+ bool foundsource;
QMap<WeatherValidator*,QString> validators;
};