Skip to content
Snippets Groups Projects
Commit 472c8069 authored by con's avatar con
Browse files

Move DebuggerRunControl initialization out of ::start method.

parent 648ceaed
No related branches found
No related tags found
No related merge requests found
......@@ -140,39 +140,39 @@ DebuggerRunControl::DebuggerRunControl(DebuggerManager *manager,
Qt::QueuedConnection);
connect(this, SIGNAL(stopRequested()),
m_manager, SLOT(exitDebugger()));
}
void DebuggerRunControl::start()
{
m_running = true;
ApplicationRunConfigurationPtr rc =
runConfiguration().objectCast<ApplicationRunConfiguration>();
if (rc) {
if (runConfiguration) {
// Enhance parameters by info from the project, but do not clobber
// arguments given in the dialogs
if (m_startParameters->executable.isEmpty())
m_startParameters->executable = rc->executable();
m_startParameters->executable = runConfiguration->executable();
if (m_startParameters->environment.empty())
m_startParameters->environment = rc->environment().toStringList();
m_startParameters->environment = runConfiguration->environment().toStringList();
if (m_startParameters->workingDir.isEmpty())
m_startParameters->workingDir = rc->workingDirectory();
m_startParameters->workingDir = runConfiguration->workingDirectory();
if (m_mode != StartExternal)
m_startParameters->processArgs = rc->commandLineArguments();
m_startParameters->processArgs = runConfiguration->commandLineArguments();
switch (m_startParameters->toolChainType) {
case ProjectExplorer::ToolChain::UNKNOWN:
case ProjectExplorer::ToolChain::INVALID:
m_startParameters->toolChainType = rc->toolChainType();
m_startParameters->toolChainType = runConfiguration->toolChainType();
break;
default:
break;
}
m_manager->setQtDumperLibraryName(rc->dumperLibrary());
m_manager->setQtDumperLibraryLocations(rc->dumperLibraryLocations());
if (const ProjectExplorer::Project *project = rc->project()) {
if (const ProjectExplorer::Project *project = runConfiguration->project()) {
m_startParameters->buildDir = project->buildDirectory(project->activeBuildConfiguration());
}
m_startParameters->useTerminal = rc->runMode() == ApplicationRunConfiguration::Console;
m_startParameters->useTerminal = runConfiguration->runMode() == ApplicationRunConfiguration::Console;
m_dumperLibrary = runConfiguration->dumperLibrary();
m_dumperLibraryLocations = runConfiguration->dumperLibraryLocations();
}
}
void DebuggerRunControl::start()
{
m_running = true;
m_manager->setQtDumperLibraryName(m_dumperLibrary);
m_manager->setQtDumperLibraryLocations(m_dumperLibraryLocations);
//emit addToOutputWindow(this, tr("Debugging %1").arg(m_executable));
m_manager->startNewDebugger(this, m_startParameters);
......
......@@ -109,6 +109,8 @@ private:
const QSharedPointer<DebuggerStartParameters> m_startParameters;
DebuggerManager *m_manager;
bool m_running;
QString m_dumperLibrary;
QStringList m_dumperLibraryLocations;
};
// A default run configuration for external executables or attaching to
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment