Replace occurrences of CVariant::toCVariant() with CVariant::from()

This commit is contained in:
Roland Winklmeier
2015-05-30 00:11:22 +02:00
parent 28d2561a48
commit e4f2c9e88a
49 changed files with 78 additions and 87 deletions

View File

@@ -192,7 +192,7 @@ namespace BlackMisc
CVariant CAircraft::propertyByIndex(const BlackMisc::CPropertyIndex &index) const
{
if (index.isMyself()) { return this->toCVariant(); }
if (index.isMyself()) { return CVariant::from(*this); }
ColumnIndex i = index.frontCasted<ColumnIndex>();
switch (i)
{

View File

@@ -79,7 +79,7 @@ namespace BlackMisc
CVariant CAircraftIcaoCode::propertyByIndex(const BlackMisc::CPropertyIndex &index) const
{
if (index.isMyself()) { return this->toCVariant(); }
if (index.isMyself()) { return CVariant::from(*this); }
ColumnIndex i = index.frontCasted<ColumnIndex>();
switch (i)
{

View File

@@ -77,7 +77,7 @@ namespace BlackMisc
CVariant CAircraftIcaoData::propertyByIndex(const BlackMisc::CPropertyIndex &index) const
{
if (index.isMyself()) { return this->toCVariant(); }
if (index.isMyself()) { return CVariant::from(*this); }
ColumnIndex i = index.frontCasted<ColumnIndex>();
switch (i)
{

View File

@@ -51,7 +51,7 @@ namespace BlackMisc
CVariant CAircraftLights::propertyByIndex(const BlackMisc::CPropertyIndex &index) const
{
if (index.isMyself()) { return this->toCVariant(); }
if (index.isMyself()) { return CVariant::from(*this); }
ColumnIndex i = index.frontCasted<ColumnIndex>();
switch (i)

View File

@@ -33,7 +33,7 @@ namespace BlackMisc
CVariant CAircraftParts::propertyByIndex(const BlackMisc::CPropertyIndex &index) const
{
if (index.isMyself()) { return this->toCVariant(); }
if (index.isMyself()) { return CVariant::from(*this); }
if (ITimestampBased::canHandleIndex(index))
{
return ITimestampBased::propertyByIndex(index);
@@ -45,7 +45,7 @@ namespace BlackMisc
case IndexCallsign:
return m_correspondingCallsign.propertyByIndex(index.copyFrontRemoved());
case IndexEngines:
return this->m_engines.toCVariant();
return CVariant::fromValue(this->m_engines);
case IndexFlapsPercentage:
return CVariant::fromValue(this->m_flapsPercentage);
case IndexGearDown:

View File

@@ -47,7 +47,7 @@ namespace BlackMisc
CVariant CAircraftSituation::propertyByIndex(const BlackMisc::CPropertyIndex &index) const
{
if (index.isMyself()) { return this->toCVariant(); }
if (index.isMyself()) { return CVariant::from(*this); }
if (ITimestampBased::canHandleIndex(index))
{
return ITimestampBased::propertyByIndex(index);

View File

@@ -37,7 +37,7 @@ namespace BlackMisc
CVariant CAirlineIcaoCode::propertyByIndex(const BlackMisc::CPropertyIndex &index) const
{
if (index.isMyself()) { return this->toCVariant(); }
if (index.isMyself()) { return CVariant::from(*this); }
ColumnIndex i = index.frontCasted<ColumnIndex>();
switch (i)
{

View File

@@ -53,7 +53,7 @@ namespace BlackMisc
CVariant CAirport::propertyByIndex(const BlackMisc::CPropertyIndex &index) const
{
if (index.isMyself()) { return this->toCVariant(); }
if (index.isMyself()) { return CVariant::from(*this); }
ColumnIndex i = index.frontCasted<ColumnIndex>();
switch (i)
{

View File

@@ -335,7 +335,7 @@ namespace BlackMisc
CVariant CAtcStation::propertyByIndex(const BlackMisc::CPropertyIndex &index) const
{
if (index.isMyself()) { return this->toCVariant(); }
if (index.isMyself()) { return CVariant::from(*this); }
ColumnIndex i = index.frontCasted<ColumnIndex>();
switch (i)
{

View File

@@ -128,7 +128,7 @@ namespace BlackMisc
CVariant CCallsign::propertyByIndex(const CPropertyIndex &index) const
{
if (index.isMyself()) { return this->toCVariant(); }
if (index.isMyself()) { return CVariant::from(*this); }
ColumnIndex i = index.frontCasted<ColumnIndex>();
switch (i)
{

View File

@@ -106,7 +106,7 @@ namespace BlackMisc
template <class AVIO>
CVariant CModulator<AVIO>::propertyByIndex(const CPropertyIndex &index) const
{
if (index.isMyself()) { return this->toCVariant(); }
if (index.isMyself()) { return CVariant::from(*derived()); }
ColumnIndex i = index.frontCasted<ColumnIndex>();
switch (i)
{

View File

@@ -146,7 +146,7 @@ namespace BlackMisc
CVariant CTransponder::propertyByIndex(const CPropertyIndex &index) const
{
if (index.isMyself()) { return this->toCVariant(); }
if (index.isMyself()) { return CVariant::from(*this); }
ColumnIndex i = index.frontCasted<ColumnIndex>();
switch (i)
{