piintrospector old pip support

This commit is contained in:
Бычков Анлрей
2022-06-08 12:15:55 +03:00
parent 6b96d20793
commit 9e72dc9bd9
2 changed files with 45 additions and 4 deletions

View File

@@ -160,7 +160,7 @@ QString QPIIntrospector::durationStr(PISystemTime t) {
return ret;
}
#if PIP_VERSION >= PIP_MAKE_VERSION(2,35,0)
void QPIIntrospector::prepareContainers(PIVector<PIIntrospectionContainers::TypeInfo> & data) {
for (PIIntrospectionContainers::TypeInfo & i: data) {
i.allocated_bytes = i.allocated * i.item_size;
@@ -170,7 +170,7 @@ void QPIIntrospector::prepareContainers(PIVector<PIIntrospectionContainers::Type
i.used_str.setReadableSize(i.used_bytes);
}
}
#endif
void QPIIntrospector::on_listApp_currentRowChanged(int r) {
PIString cs;
@@ -207,7 +207,9 @@ void QPIIntrospector::peerReceived(const PIString & from, const PIByteArray & da
pba.clear(); cs.get(pba);
PIVector<PIIntrospectionContainers::TypeInfo> data;
PIIntrospection::unpackContainers(pba, data);
#if PIP_VERSION >= PIP_MAKE_VERSION(2,35,0)
prepareContainers(data);
#endif
widgetContainers->showContainers(data);
} break;
case PIIntrospection::itObjects: {