refs #614, changed matcher and applied changes

* new function in model list
* removed all models in matcher, only provider data will be used
This commit is contained in:
Klaus Basan
2016-04-01 01:21:59 +02:00
parent bc29514829
commit a5d0453019
8 changed files with 132 additions and 196 deletions

View File

@@ -215,6 +215,44 @@ namespace BlackMisc
return c;
}
int CAircraftModelList::removeAllWithoutModelString()
{
if (this->isEmpty()) { return 0; }
int c = 0;
for (auto it = this->begin(); it != this->end();)
{
if (it->hasModelString())
{
++it;
}
else
{
c++;
it = this->erase(it);
}
}
return c;
}
int CAircraftModelList::removeIfExcluded()
{
if (this->isEmpty()) { return 0; }
int c = 0;
for (auto it = this->begin(); it != this->end();)
{
if (it->getModelMode() != CAircraftModel::Exclude)
{
++it;
}
else
{
c++;
it = this->erase(it);
}
}
return c;
}
int CAircraftModelList::replaceOrAddModelsWithString(const CAircraftModelList &addOrReplaceList, Qt::CaseSensitivity sensitivity)
{
if (addOrReplaceList.isEmpty()) { return 0; }