mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
refs #755, validation also for "distributors from DB"
* validation now in webdataservices (so it can check against DB data) * utility functions
This commit is contained in:
committed by
Roland Winklmeier
parent
610dba2028
commit
0846a8773a
@@ -36,7 +36,7 @@ namespace BlackMisc
|
||||
|
||||
CDistributor CDistributorList::findByModelData(const CAircraftModel &model) const
|
||||
{
|
||||
// some stuipd hardcoded resolutions
|
||||
// some stuipd hardcoded resolutions for distributors
|
||||
if (model.getDistributor().hasValidDbKey()) { return model.getDistributor(); }
|
||||
if (model.getModelString().startsWith("WOA", Qt::CaseInsensitive)) { return this->findByKeyOrAlias("WOAI"); }
|
||||
if (model.getDescription().contains("WOA", Qt::CaseInsensitive)) { return this->findByKeyOrAlias("WOAI"); }
|
||||
@@ -114,5 +114,15 @@ namespace BlackMisc
|
||||
}
|
||||
return distributors;
|
||||
}
|
||||
|
||||
bool CDistributorList::isCompletelyFromDb() const
|
||||
{
|
||||
return !this->contains(&CDistributor::isLoadedFromDb, false);
|
||||
}
|
||||
|
||||
int CDistributorList::removeIfNotLoadedFromDb()
|
||||
{
|
||||
return this->removeIf(&CDistributor::isLoadedFromDb, false);
|
||||
}
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user