mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 02:35:33 +08:00
refs #437, remove convertFromCVariant
This commit is contained in:
@@ -361,8 +361,7 @@ namespace BlackGui
|
||||
|
||||
CVariant CAltitudeFormatter::displayRole(const CVariant &altitude) const
|
||||
{
|
||||
CAltitude alt;
|
||||
alt.convertFromCVariant(altitude);
|
||||
CAltitude alt(altitude.to<CAltitude>());
|
||||
if (m_flightLevel) { alt.toFlightLevel(); }
|
||||
return alt.toQString(this->m_useI18n);
|
||||
}
|
||||
|
||||
@@ -374,8 +374,7 @@ namespace BlackGui
|
||||
template <typename ObjectType, typename ContainerType>
|
||||
int CListModelBase<ObjectType, ContainerType>::performUpdateContainer(const BlackMisc::CVariant &variant, bool sort)
|
||||
{
|
||||
ContainerType c;
|
||||
c.convertFromCVariant(variant);
|
||||
ContainerType c(variant.to<ContainerType>());
|
||||
return this->update(c, sort);
|
||||
}
|
||||
|
||||
|
||||
@@ -376,8 +376,7 @@ namespace BlackGui
|
||||
template <class ModelClass, class ContainerType, class ObjectType>
|
||||
int CViewBase<ModelClass, ContainerType, ObjectType>::performUpdateContainer(const BlackMisc::CVariant &variant, bool sort, bool resize)
|
||||
{
|
||||
ContainerType c;
|
||||
c.convertFromCVariant(variant);
|
||||
ContainerType c(variant.to<ContainerType>());
|
||||
return this->updateContainer(c, sort, resize);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user