mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
refs #720, improved distributor and airline/livery detection
* mark data read from DB (req. for string key where existing key value is not reliable indicator for DB data) * detect distributors by part of model string * use a simplified name (no spaces, no special characters) to find a match * allow to obtain model strings (=keys) as set and list
This commit is contained in:
committed by
Mathew Sutcliffe
parent
39dae7ed45
commit
f9922353c4
@@ -365,7 +365,7 @@ namespace BlackMisc
|
||||
return addOrReplaceList.size();
|
||||
}
|
||||
CAircraftModelList newModels(*this);
|
||||
const QStringList keys(addOrReplaceList.getModelStrings(false));
|
||||
const QStringList keys(addOrReplaceList.getModelStringList(false));
|
||||
newModels.removeModelsWithString(keys, sensitivity);
|
||||
int removed = newModels.size(); // size after removing
|
||||
newModels.push_back(addOrReplaceList);
|
||||
@@ -398,7 +398,7 @@ namespace BlackMisc
|
||||
});
|
||||
}
|
||||
|
||||
QStringList CAircraftModelList::getModelStrings(bool sort) const
|
||||
QStringList CAircraftModelList::getModelStringList(bool sort) const
|
||||
{
|
||||
QStringList ms;
|
||||
for (const CAircraftModel &model : (*this))
|
||||
@@ -410,6 +410,17 @@ namespace BlackMisc
|
||||
return ms;
|
||||
}
|
||||
|
||||
QSet<QString> CAircraftModelList::getModelStringSet() const
|
||||
{
|
||||
QSet<QString> ms;
|
||||
for (const CAircraftModel &model : (*this))
|
||||
{
|
||||
if (!model.hasModelString()) { continue; }
|
||||
ms.insert(model.getModelString());
|
||||
}
|
||||
return ms;
|
||||
}
|
||||
|
||||
CCountPerSimulator CAircraftModelList::countPerSimulator() const
|
||||
{
|
||||
CCountPerSimulator count;
|
||||
|
||||
Reference in New Issue
Block a user