MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / runningProcesses

Method runningProcesses

app/src/API/ProcessLauncher.cpp:252–269  ·  view source on GitHub ↗

* @brief Returns the id, program, and arguments of every running managed process. */

Source from the content-addressed store, hash-verified

250 * @brief Returns the id, program, and arguments of every running managed process.
251 */
252QVariantList API::ProcessLauncher::runningProcesses() const
253{
254 QVariantList list;
255 for (auto it = m_processes.constBegin(); it != m_processes.constEnd(); ++it) {
256 const auto* process = it.value();
257 if (!process)
258 continue;
259
260 QVariantMap entry;
261 entry.insert(QStringLiteral("processId"), it.key());
262 entry.insert(QStringLiteral("program"), process->program());
263 entry.insert(QStringLiteral("arguments"), process->arguments());
264 entry.insert(QStringLiteral("workingDir"), process->workingDirectory());
265 list.append(entry);
266 }
267
268 return list;
269}
270
271/**
272 * @brief Reaps every helper only on a real connected -> disconnected transition. A bare

Callers

nothing calls this directly

Calls 4

keyMethod · 0.80
argumentsMethod · 0.80
valueMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected