forked from qt-creator/qt-creator
Valgrind: Do not open a terminal for callgrind control
Change-Id: I22892d43abc341703a2d046dc1d3b9bf4b736394 Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
b62ae63fc2
commit
e75b88cd7c
@@ -128,7 +128,7 @@ void CallgrindController::run(Option option)
|
|||||||
const int pid = Utils::HostOsInfo::isWindowsHost() ? 0 : m_valgrindProc->pid();
|
const int pid = Utils::HostOsInfo::isWindowsHost() ? 0 : m_valgrindProc->pid();
|
||||||
m_process->setValgrindExecutable(CALLGRIND_CONTROL_BINARY);
|
m_process->setValgrindExecutable(CALLGRIND_CONTROL_BINARY);
|
||||||
m_process->setValgrindArguments(QStringList() << optionString << QString::number(pid));
|
m_process->setValgrindArguments(QStringList() << optionString << QString::number(pid));
|
||||||
m_process->run();
|
m_process->run(ProjectExplorer::ApplicationLauncher::Gui);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CallgrindController::processError(QProcess::ProcessError)
|
void CallgrindController::processError(QProcess::ProcessError)
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ void ValgrindProcess::close()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ValgrindProcess::run()
|
void ValgrindProcess::run(ApplicationLauncher::Mode runMode)
|
||||||
{
|
{
|
||||||
if (isLocal()) {
|
if (isLocal()) {
|
||||||
connect(&m_localProcess, &ApplicationLauncher::processExited,
|
connect(&m_localProcess, &ApplicationLauncher::processExited,
|
||||||
@@ -125,7 +125,7 @@ void ValgrindProcess::run()
|
|||||||
|
|
||||||
StandardRunnable valgrind;
|
StandardRunnable valgrind;
|
||||||
valgrind.executable = m_valgrindExecutable;
|
valgrind.executable = m_valgrindExecutable;
|
||||||
valgrind.runMode = m_debuggee.runMode;
|
valgrind.runMode = runMode;
|
||||||
valgrind.commandLineArguments = argumentString(Utils::HostOsInfo::hostOs());
|
valgrind.commandLineArguments = argumentString(Utils::HostOsInfo::hostOs());
|
||||||
valgrind.workingDirectory = m_debuggee.workingDirectory;
|
valgrind.workingDirectory = m_debuggee.workingDirectory;
|
||||||
valgrind.environment = m_debuggee.environment;
|
valgrind.environment = m_debuggee.environment;
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public:
|
|||||||
void setValgrindArguments(const QStringList &valgrindArguments);
|
void setValgrindArguments(const QStringList &valgrindArguments);
|
||||||
void setDebuggee(const ProjectExplorer::StandardRunnable &debuggee);
|
void setDebuggee(const ProjectExplorer::StandardRunnable &debuggee);
|
||||||
|
|
||||||
void run();
|
void run(ProjectExplorer::ApplicationLauncher::Mode runMode);
|
||||||
void close();
|
void close();
|
||||||
|
|
||||||
QString errorString() const;
|
QString errorString() const;
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ bool ValgrindRunner::start()
|
|||||||
QObject::connect(d->process, &ValgrindProcess::error,
|
QObject::connect(d->process, &ValgrindProcess::error,
|
||||||
this, &ValgrindRunner::processError);
|
this, &ValgrindRunner::processError);
|
||||||
|
|
||||||
d->process->run();
|
d->process->run(d->debuggee.runMode);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user