refs #720, adjusted exposed functions to new naming

* some minor formatting
* use the new condolidation functions
This commit is contained in:
Klaus Basan
2016-08-09 01:45:09 +02:00
committed by Mathew Sutcliffe
parent d9a35563e3
commit 1167735897
11 changed files with 45 additions and 21 deletions

View File

@@ -318,7 +318,7 @@ namespace BlackGui
this->ui->tvp_AircraftModels->updateContainer(ml);
// model completer
this->m_modelCompleter->setModel(new QStringListModel(ml.getModelStrings(), this->m_modelCompleter));
this->m_modelCompleter->setModel(new QStringListModel(ml.getModelStringList(), this->m_modelCompleter));
this->m_modelCompleter->setModelSorting(QCompleter::CaseInsensitivelySortedModel);
this->m_modelCompleter->setCaseSensitivity(Qt::CaseInsensitive);
this->m_modelCompleter->setWrapAround(true);

View File

@@ -185,7 +185,7 @@ namespace BlackGui
if (!code.hasCompleteData()) { return; }
if (!code.hasValidDbKey()) { return; }
const CLivery stdLivery(sGui->getWebDataServices()->getLiveries().findStdLiveryByAirlineIcaoDesignator(code));
const CLivery stdLivery(sGui->getWebDataServices()->getLiveries().findStdLiveryByAirlineIcaoVDesignator(code));
if (stdLivery.hasValidDbKey())
{
this->setValue(stdLivery);

View File

@@ -171,14 +171,14 @@ namespace BlackGui
QStringList CAircraftModelListModel::getModelStrings(bool sort) const
{
if (this->isEmpty()) { return QStringList(); }
return this->container().getModelStrings(sort);
return this->container().getModelStringList(sort);
}
void CAircraftModelListModel::replaceOrAddByModelString(const CAircraftModelList &models)
{
if (models.isEmpty()) { return; }
CAircraftModelList currentModels(container());
currentModels.removeModelsWithString(models.getModelStrings(true), Qt::CaseInsensitive);
currentModels.removeModelsWithString(models.getModelStringList(true), Qt::CaseInsensitive);
currentModels.push_back(models);
this->updateContainerMaybeAsync(currentModels);
}

View File

@@ -474,7 +474,6 @@ namespace BlackGui
void CViewBaseNonTemplate::ps_loadJsonAction()
{
if (this->isEmpty()) { return; }
if (!this->m_menus.testFlag(MenuLoad)) { return; }
this->ps_loadJson();
}