Improved samples and debugging information

* DBus test for CSimulatedAircraft
* Output of metatypes in GUI/core
* Changed output from qDebug() to QTextStream
* Variant test for CSimulatedAircraft
This commit is contained in:
Klaus Basan
2015-01-25 03:49:32 +01:00
parent deba08eef0
commit ca07e68c34
14 changed files with 95 additions and 24 deletions

View File

@@ -333,13 +333,15 @@ size_t BlackMisc::heapSizeOf(const QMetaObject &)
/*
* Dump all user types
*/
void BlackMisc::displayAllUserMetatypesTypes()
void BlackMisc::displayAllUserMetatypesTypes(QTextStream &out)
{
for (int mt = QMetaType::User; mt < QMetaType::User + 1000; mt++)
{
if (!QMetaType::isRegistered(mt)) continue;
if (!QMetaType::isRegistered(mt)) { continue; }
QMetaType metaType(mt);
qDebug() << "type:" << mt << "name:" << QMetaType::typeName(mt) << QMetaType::sizeOf(mt) << BlackMisc::heapSizeOf(metaType);
out << "type: " << mt << " name:" << QMetaType::typeName(mt) << " | "
<< QMetaType::sizeOf(mt) << " / " << BlackMisc::heapSizeOf(metaType) << endl;
}
}