mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
refs #437, remove convertFromCVariant
This commit is contained in:
@@ -62,11 +62,7 @@ namespace BlackMisc
|
||||
|
||||
void CAircraftModel::setPropertyByIndex(const CVariant &variant, const BlackMisc::CPropertyIndex &index)
|
||||
{
|
||||
if (index.isMyself())
|
||||
{
|
||||
this->convertFromCVariant(variant);
|
||||
return;
|
||||
}
|
||||
if (index.isMyself()) { (*this) = variant.to<CAircraftModel>(); return; }
|
||||
ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
switch (i)
|
||||
{
|
||||
|
||||
@@ -107,11 +107,7 @@ namespace BlackMisc
|
||||
|
||||
void CAirspaceAircraftSnapshot::setPropertyByIndex(const CVariant &variant, const CPropertyIndex &index)
|
||||
{
|
||||
if (index.isMyself())
|
||||
{
|
||||
this->convertFromCVariant(variant);
|
||||
return;
|
||||
}
|
||||
if (index.isMyself()) { (*this) = variant.to<CAirspaceAircraftSnapshot>(); return; }
|
||||
CValueObject::setPropertyByIndex(variant, index);
|
||||
}
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ namespace BlackMisc
|
||||
|
||||
void CAircraftCfgEntries::setPropertyByIndex(const CVariant &variant, const BlackMisc::CPropertyIndex &index)
|
||||
{
|
||||
if (index.isMyself()) { this->convertFromCVariant(variant); return; }
|
||||
if (index.isMyself()) { (*this) = variant.to<CAircraftCfgEntries>(); return; }
|
||||
ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
switch (i)
|
||||
{
|
||||
|
||||
@@ -64,11 +64,7 @@ namespace BlackMisc
|
||||
|
||||
void CSimulatedAircraft::setPropertyByIndex(const CVariant &variant, const BlackMisc::CPropertyIndex &index)
|
||||
{
|
||||
if (index.isMyself())
|
||||
{
|
||||
this->convertFromCVariant(variant);
|
||||
return;
|
||||
}
|
||||
if (index.isMyself()) { (*this) = variant.to<CSimulatedAircraft>(); return; }
|
||||
ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
switch (i)
|
||||
{
|
||||
|
||||
@@ -70,17 +70,12 @@ namespace BlackMisc
|
||||
|
||||
void CSimulatorSetup::setPropertyByIndex(const CVariant &variant, const BlackMisc::CPropertyIndex &index)
|
||||
{
|
||||
if (index.isMyself())
|
||||
{
|
||||
this->convertFromCVariant(variant);
|
||||
return;
|
||||
}
|
||||
|
||||
if (index.isMyself()) { (*this) = variant.to<CSimulatorSetup>(); return; }
|
||||
ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
switch (i)
|
||||
{
|
||||
case IndexData:
|
||||
this->m_data.convertFromCVariant(variant.value<QString>());
|
||||
this->m_data = variant.to<CNameVariantPairList>();
|
||||
break;
|
||||
default:
|
||||
CValueObject::setPropertyByIndex(variant, index);
|
||||
|
||||
Reference in New Issue
Block a user