mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
Split of CSimulatorPluginInfo and CSimulatorSetup
refs #404, and discussion https://dev.vatsim-germany.org/issues/404#note-8 * Changed CSimulatorSetup to use CNameVariantPairList as data. The old version was an hack and had to go, CNameVariantPairList would allow complex types in the future and can be already shown in the GUI. * CNameVariantPairList was improved slightly in the same step * Functions to get CSimulatorSetup from driver / context * Removed CSimulatorSetup data from CSimulatorPluginInfo
This commit is contained in:
@@ -62,7 +62,7 @@ namespace BlackGui
|
||||
|
||||
int CNameVariantPairModel::getRowIndexForName(const QString &name) const
|
||||
{
|
||||
int rowIndex = this->m_container.getNameRowIndex(name);
|
||||
int rowIndex = this->m_container.getIndexForName(name);
|
||||
return rowIndex;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace BlackGui
|
||||
bool CNameVariantPairModel::containsNameValue(const QString &name, const BlackMisc::CVariant &value) const
|
||||
{
|
||||
int rowIndex = this->getRowIndexForName(name);
|
||||
if (rowIndex < 0) return false;
|
||||
if (rowIndex < 0) { return false; }
|
||||
QModelIndex i = this->index(rowIndex, 0);
|
||||
const CNameVariantPair cv = this->at(i);
|
||||
return value == cv.toCVariant();
|
||||
|
||||
Reference in New Issue
Block a user