* @brief Returns the id, program, and arguments of every running managed process. */
| 250 | * @brief Returns the id, program, and arguments of every running managed process. |
| 251 | */ |
| 252 | QVariantList 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 |