MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / updateProcess

Method updateProcess

src/plugins/debugger/interface/attachinfodialog.cpp:100–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100void AttachInfoDialog::updateProcess()
101{
102 model->removeRows(1, model->rowCount() - 1);
103
104 QStringList procList = QDir("/proc").entryList(QDir::Dirs | QDir::NoDotAndDotDot);
105 for (const QString &pid : procList) {
106 QString exePath = QString("/proc/%1/exe").arg(pid);
107 if (QFile::exists(exePath)) {
108 QFileInfo fileInfo(exePath);
109 QString path = fileInfo.symLinkTarget();
110 if (path.isEmpty()) {
111 path = exePath;
112 }
113
114 model->appendRow({new QStandardItem(pid), new QStandardItem(path)});
115 }
116 }
117}

Callers

nothing calls this directly

Calls 4

QStringClass · 0.50
rowCountMethod · 0.45
isEmptyMethod · 0.45
appendRowMethod · 0.45

Tested by

no test coverage detected