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

Method runValgrind

src/plugins/valgrind/mainframe/valgrindrunner.cpp:71–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71void ValgrindRunner::runValgrind(const QString &type)
72{
73 if(!checkValgrindToolPath())
74 return;
75 runBuilding();
76 setValgrindArgs(type);
77 QProcess procValgrind;
78 connect(&procValgrind, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished),
79 [&]() {
80 emit valgrindFinished(d->xmlFilePath, type);
81 });
82
83 connect(&procValgrind, &QProcess::readyReadStandardError, [&]() {
84 procValgrind.setReadChannel(QProcess::StandardError);
85 while (procValgrind.canReadLine()) {
86 QString line = QString::fromUtf8(procValgrind.readLine());
87 outputMsg(line, OutputPane::OutputFormat::StdErr);
88 }
89 });
90
91 connect(&procValgrind, &QProcess::readyReadStandardOutput, [&]() {
92 procValgrind.setReadChannel(QProcess::StandardError);
93 while (procValgrind.canReadLine()) {
94 QString line = QString::fromUtf8(procValgrind.readLine());
95 outputMsg(line, OutputPane::OutputFormat::StdOut);
96 }
97 });
98
99 procValgrind.start("valgrind", d->ValgrindArgs);
100 emit clearValgrindBar(type);
101 procValgrind.waitForFinished(-1);
102}
103
104ValgrindRunner *ValgrindRunner::instance()
105{

Callers 1

initializeMethod · 0.80

Calls 4

connectFunction · 0.85
canReadLineMethod · 0.80
readLineMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected