Ref T160, further formatting

This commit is contained in:
Klaus Basan
2017-09-25 03:39:52 +02:00
parent d1898b26fc
commit ec77f9c64b
5 changed files with 48 additions and 101 deletions

View File

@@ -107,31 +107,21 @@ namespace BlackMisc
{
if (index.isMyself()) { return CVariant::from(*this); }
ColumnIndex i = index.frontCasted<ColumnIndex>();
const ColumnIndex i = index.frontCasted<ColumnIndex>();
if (ITimestampBased::canHandleIndex(index)) { return ITimestampBased::propertyByIndex(index); }
switch (i)
{
case IndexName:
return CVariant::fromValue(m_name);
case IndexMachineIdBase64:
return CVariant::fromValue(m_machineIdBase64);
case IndexMachineName:
return CVariant::fromValue(getMachineName());
case IndexMachineId:
return CVariant::fromValue(getMachineId());
case IndexProcessId:
return CVariant::fromValue(m_processId);
case IndexProcessName:
return CVariant::fromValue(m_processName);
case IndexIsFromLocalMachine:
return CVariant::fromValue(isFromLocalMachine());
case IndexIsFromSameProcess:
return CVariant::fromValue(isFromSameProcess());
case IndexIsFromSameProcessName:
return CVariant::fromValue(isFromSameProcessName());
default:
return CValueObject::propertyByIndex(index);
case IndexName: return CVariant::fromValue(m_name);
case IndexMachineIdBase64: return CVariant::fromValue(m_machineIdBase64);
case IndexMachineName: return CVariant::fromValue(getMachineName());
case IndexMachineId: return CVariant::fromValue(getMachineId());
case IndexProcessId: return CVariant::fromValue(m_processId);
case IndexProcessName: return CVariant::fromValue(m_processName);
case IndexIsFromLocalMachine: return CVariant::fromValue(isFromLocalMachine());
case IndexIsFromSameProcess: return CVariant::fromValue(isFromSameProcess());
case IndexIsFromSameProcessName: return CVariant::fromValue(isFromSameProcessName());
default: return CValueObject::propertyByIndex(index);
}
}

View File

@@ -410,7 +410,6 @@ namespace BlackMisc
QPointer<T> m_weak;
CConnectionGuard m_guard;
};
}
#endif