mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 07:35:48 +08:00
Ref T240, style/minor fixes
* Q_DECLARE_METATYPE was wrong * missing/unused include * suppress CPP check warning
This commit is contained in:
@@ -52,16 +52,14 @@ namespace BlackMisc
|
||||
return allPacketTypes;
|
||||
}
|
||||
|
||||
CVariant CRawFsdMessage::propertyByIndex(const BlackMisc::CPropertyIndex &index) const
|
||||
CVariant CRawFsdMessage::propertyByIndex(const CPropertyIndex &index) const
|
||||
{
|
||||
if (index.isMyself()) { return CVariant::from(*this); }
|
||||
ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
const ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
switch (i)
|
||||
{
|
||||
case IndexReceptionTime:
|
||||
return CVariant::fromValue(this->m_rawMessage);
|
||||
case IndexRawMessage:
|
||||
return CVariant::fromValue(this->m_receptionTime);
|
||||
case IndexReceptionTime: return CVariant::fromValue(m_rawMessage);
|
||||
case IndexRawMessage: return CVariant::fromValue(m_receptionTime);
|
||||
default:
|
||||
return CValueObject::propertyByIndex(index);
|
||||
}
|
||||
@@ -70,7 +68,7 @@ namespace BlackMisc
|
||||
void CRawFsdMessage::setPropertyByIndex(const CPropertyIndex &index, const CVariant &variant)
|
||||
{
|
||||
if (index.isMyself()) { (*this) = variant.to<CRawFsdMessage>(); return; }
|
||||
ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
const ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
switch (i)
|
||||
{
|
||||
case IndexRawMessage:
|
||||
|
||||
Reference in New Issue
Block a user