From 6bcc657adb23ff44b322976b94b1e4548996cd98 Mon Sep 17 00:00:00 2001 From: Filipe Azevedo Date: Fri, 13 Jan 2017 13:16:32 +0100 Subject: [PATCH] Add api to get running run controls pids MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit That’s needed for GammaRay integration. Change-Id: Ia3f4300299cd8792ec0a370f7ab3e30c9ad634bc Reviewed-by: Tobias Hunger --- src/plugins/projectexplorer/projectexplorer.cpp | 10 ++++++++++ src/plugins/projectexplorer/projectexplorer.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index ac67ba9ea31..a4aed71e841 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -2558,6 +2558,16 @@ void ProjectExplorerPlugin::runRunConfiguration(RunConfiguration *rc, emit m_instance->updateRunActions(); } +QList> ProjectExplorerPlugin::runningRunControlProcesses() +{ + QList> processes; + foreach (RunControl *rc, dd->m_outputPane->allRunControls()) { + if (rc->isRunning()) + processes << qMakePair(rc->runnable(), rc->applicationProcessHandle()); + } + return processes; +} + void ProjectExplorerPluginPrivate::projectAdded(Project *pro) { if (m_projectsMode) diff --git a/src/plugins/projectexplorer/projectexplorer.h b/src/plugins/projectexplorer/projectexplorer.h index 160c9666281..c33830e3f06 100644 --- a/src/plugins/projectexplorer/projectexplorer.h +++ b/src/plugins/projectexplorer/projectexplorer.h @@ -52,6 +52,7 @@ class Project; class Node; class FolderNode; class FileNode; +class ProcessHandle; namespace Internal { class ProjectExplorerSettings; } @@ -139,6 +140,7 @@ public: static void runStartupProject(Core::Id runMode, bool forceSkipDeploy = false); static void runRunConfiguration(RunConfiguration *rc, Core::Id runMode, const bool forceSkipDeploy = false); + static QList> runningRunControlProcesses(); static void addExistingFiles(FolderNode *folderNode, const QStringList &filePaths);