mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
refs #568, specialized lists (timestamp, DB objects, model list)
* remaned to latest/oldestObject * JSON functions with prefix * remove by keys * only add models with model string to QStringList
This commit is contained in:
@@ -109,7 +109,7 @@ namespace BlackMisc
|
||||
int CAircraftModelList::removeModelsWithString(const QStringList &modelStrings, Qt::CaseSensitivity sensitivity)
|
||||
{
|
||||
int cs = this->size();
|
||||
(*this) = (findByNotInModelStrings(modelStrings, sensitivity));
|
||||
(*this) = (this->findByNotInModelStrings(modelStrings, sensitivity));
|
||||
int d = cs - this->size();
|
||||
return d;
|
||||
}
|
||||
@@ -134,7 +134,8 @@ namespace BlackMisc
|
||||
{
|
||||
return this->findBy([ = ](const CAircraftModel & model)
|
||||
{
|
||||
return !modelStrings.contains(model.getModelString(), sensitivity);
|
||||
const bool c = modelStrings.contains(model.getModelString(), sensitivity);
|
||||
return !c;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -143,6 +144,7 @@ namespace BlackMisc
|
||||
QStringList ms;
|
||||
for (const CAircraftModel &model : (*this))
|
||||
{
|
||||
if (!model.hasModelString()) { continue; }
|
||||
ms.append(model.getModelString());
|
||||
}
|
||||
if (sort) { ms.sort(Qt::CaseInsensitive); }
|
||||
|
||||
Reference in New Issue
Block a user