This commit is contained in:
2022-05-03 18:57:01 +03:00
parent d34a7cc38f
commit 1a8b442aaa
7 changed files with 37 additions and 1 deletions

View File

@@ -16,7 +16,8 @@ int main(int argc, char * argv[]) {
QPIConfig cfg(a.arguments()[1]);
QByteArray model = cfg.getValue("connectionmodel").toByteArray();
if (!model.isEmpty()) w.setModel(model);
}
} else
w.recreateConnection();
if (w.exec() == QDialog::Accepted) {
QString c = QFileDialog::getSaveFileName(&w, "Save config to file", a.applicationDirPath(), "*.conf");
if (!c.isEmpty()) {

View File

@@ -28,7 +28,11 @@ QPIIntrospector::QPIIntrospector(QWidget * parent): EMainWindow(parent), peer("_
PICodeInfo::EnumInfo * ei = PICodeInfo::enumsInfo->value("PIIntrospection::InfoTypes");
if (ei) {
piForeachC (PICodeInfo::EnumeratorInfo & e, ei->members) {
#if PIP_VERSION >= PIP_MAKE_VERSION(2,39,0)
QCheckBox * cb = new QCheckBox(PI2QString(e.name.mid(2).toString()));
#else
QCheckBox * cb = new QCheckBox(PI2QString(e.name.mid(2)));
#endif
cb->setObjectName(QString("checkRequest%1").arg(e.value));
cb->setProperty("__value__", e.value);
layoutRequestFlags->addWidget(cb);

View File

@@ -25,7 +25,11 @@ ThreadsModel::ThreadsModel() {
PICodeInfo::EnumInfo * ei = PICodeInfo::enumsInfo->value("PIIntrospectionThreads::ThreadState");
if (ei) {
piForeachC (PICodeInfo::EnumeratorInfo & e, ei->members) {
#if PIP_VERSION >= PIP_MAKE_VERSION(2,39,0)
state_names[e.value] = PI2QString(e.name.mid(1).toString());
#else
state_names[e.value] = PI2QString(e.name.mid(1));
#endif
}
}
state_colors[PIIntrospectionThreads::sStopped] = QColor(Qt::red).lighter(150);