piintrospector fixes and optimization
This commit is contained in:
@@ -157,6 +157,17 @@ QString QPIIntrospector::durationStr(PISystemTime t) {
|
||||
}
|
||||
|
||||
|
||||
void QPIIntrospector::prepareContainers(PIVector<PIIntrospectionContainers::TypeInfo> & data) {
|
||||
for (PIIntrospectionContainers::TypeInfo & i: data) {
|
||||
i.allocated_bytes = i.allocated * i.item_size;
|
||||
i.used_bytes = i.used * i.item_size;
|
||||
i.item_size_str.setReadableSize(i.item_size);
|
||||
i.allocated_str.setReadableSize(i.allocated_bytes);
|
||||
i.used_str.setReadableSize(i.used_bytes);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void QPIIntrospector::on_listApp_currentRowChanged(int r) {
|
||||
PIString cs;
|
||||
if (r < 0) cs.clear();
|
||||
@@ -192,6 +203,7 @@ void QPIIntrospector::peerReceived(const PIString & from, const PIByteArray & da
|
||||
pba.clear(); cs.get(pba);
|
||||
PIVector<PIIntrospectionContainers::TypeInfo> data;
|
||||
PIIntrospection::unpackContainers(pba, data);
|
||||
prepareContainers(data);
|
||||
widgetContainers->showContainers(data);
|
||||
} break;
|
||||
case PIIntrospection::itObjects: {
|
||||
|
||||
Reference in New Issue
Block a user