mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
refs #437, remove convertFromCVariant
This commit is contained in:
@@ -55,11 +55,7 @@ namespace BlackMisc
|
||||
|
||||
void CAircraftMapping::setPropertyByIndex(const CVariant &variant, const BlackMisc::CPropertyIndex &index)
|
||||
{
|
||||
if (index.isMyself())
|
||||
{
|
||||
this->convertFromCVariant(variant);
|
||||
return;
|
||||
}
|
||||
if (index.isMyself()) { (*this) = variant.to<CAircraftMapping>(); return; }
|
||||
ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
switch (i)
|
||||
{
|
||||
|
||||
@@ -101,11 +101,7 @@ namespace BlackMisc
|
||||
|
||||
void CClient::setPropertyByIndex(const CVariant &variant, const BlackMisc::CPropertyIndex &index)
|
||||
{
|
||||
if (index.isMyself())
|
||||
{
|
||||
this->convertFromCVariant(variant);
|
||||
return;
|
||||
}
|
||||
if (index.isMyself()) { (*this) = variant.to<CClient>(); return; }
|
||||
ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
switch (i)
|
||||
{
|
||||
|
||||
@@ -70,12 +70,7 @@ namespace BlackMisc
|
||||
|
||||
void CServer::setPropertyByIndex(const CVariant &variant, const BlackMisc::CPropertyIndex &index)
|
||||
{
|
||||
if (index.isMyself())
|
||||
{
|
||||
this->convertFromCVariant(variant);
|
||||
return;
|
||||
}
|
||||
|
||||
if (index.isMyself()) { (*this) = variant.to<CServer>(); return; }
|
||||
ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
switch (i)
|
||||
{
|
||||
|
||||
@@ -207,11 +207,7 @@ namespace BlackMisc
|
||||
|
||||
void CTextMessage::setPropertyByIndex(const CVariant &variant, const BlackMisc::CPropertyIndex &index)
|
||||
{
|
||||
if (index.isMyself())
|
||||
{
|
||||
this->convertFromCVariant(variant);
|
||||
return;
|
||||
}
|
||||
if (index.isMyself()) { (*this) = variant.to<CTextMessage>(); return; }
|
||||
if (ITimestampBased::canHandleIndex(index)) { ITimestampBased::setPropertyByIndex(variant, index); return; }
|
||||
|
||||
ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
|
||||
@@ -216,11 +216,7 @@ namespace BlackMisc
|
||||
|
||||
void CUser::setPropertyByIndex(const CVariant &variant, const BlackMisc::CPropertyIndex &index)
|
||||
{
|
||||
if (index.isMyself())
|
||||
{
|
||||
this->convertFromCVariant(variant);
|
||||
return;
|
||||
}
|
||||
if (index.isMyself()) { (*this) = variant.to<CUser>(); return; }
|
||||
ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
switch (i)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user