[Qt-creator] Capture Application Output via Plugin
Daniel Engelke
dan at dew1.net
Thu May 6 16:23:26 CEST 2021
Hi Christian,
Thanks, I want to process the application output (find errors during
runtime, stats, etc.).
The "from" is an external plugin implementing ExtensionSystem::IPlugin.
The following test code seems to work. However, it's not as straightforward
as I had hoped.
connect(ProjectExplorer::ProjectExplorerPlugin::instance(),
&ProjectExplorer::ProjectExplorerPlugin::runActionsUpdated, this, [this] {
for (const auto runActions =
ProjectExplorer::ProjectExplorerPlugin::allRunControls(); auto *runControl :
runActions)
{
if (runControl != nullptr && !m_runControls.contains(runControl))
{
m_runControls.insert(runControl);
connect(runControl, &ProjectExplorer::RunControl::destroyed,
this, [this, runControl] { m_runControls.remove(runControl); });
connect(runControl,
&ProjectExplorer::RunControl::appendMessage,
m_outputPane,
&TestPlugin::Internal::OutputPane::appendMessage);
}
}
});
I was hoping for a signal like runActionAdded and runActionRemoved, instead
of runActionsUpdated, which requires me to check what and where a change has
occurred.
Dan
From: Qt-creator <qt-creator-bounces at qt-project.org
<mailto:qt-creator-bounces at qt-project.org> > On Behalf Of Christian Kandeler
Sent: Thursday, May 6, 2021 1:00 PM
To: qt-creator at qt-project.org <mailto:qt-creator at qt-project.org>
Subject: Re: [Qt-creator] Capture Application Output via Plugin
On 4/30/21 9:24 PM, dan at dew1.net <mailto:dan at dew1.net> wrote:
I think I get how most of the Creator Plugin Development works.
However, I seem unable to figure out the best way to capture the individual
application outputs.
>From where, and for what purpose?
Christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20210506/b17925eb/attachment-0001.html>
More information about the Qt-creator
mailing list