forked from qt-creator/qt-creator
ProjectExplorer: Rework executable display handling in runconfigs
The basic idea is to provide an easy-to-configure reusable building block to provide an "Executable" in a run configuration. This patch here extracts some generic from the previous ExecutableAspect into a BaseStringAspect and bases the new ExecutableAspect implementation on it. It also adds the the ability to make it editable or to manually override an executable, and adds a SymbolFile aspect for the accompanying sources of debug information. Use in RemoteLinux and Qnx for starters and demonstration purposes. In the end the Qnx runconfiguration widget does not depend on the RemoteLinux implementation anymore by replacing the previous code-sharing-by-inheritance by direct (and less) code. Change-Id: I91b55820455256a8526e39458364b6cb74e63cd7 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -45,6 +45,7 @@
|
||||
#include <projectexplorer/kitchooser.h>
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/runconfigurationaspects.h>
|
||||
#include <projectexplorer/runnables.h>
|
||||
#include <projectexplorer/target.h>
|
||||
#include <projectexplorer/toolchain.h>
|
||||
@@ -157,7 +158,6 @@ QnxDebugSupport::QnxDebugSupport(RunControl *runControl)
|
||||
setSolibSearchPath(searchPaths(k));
|
||||
if (auto qtVersion = dynamic_cast<QnxQtVersion *>(QtSupport::QtKitInformation::qtVersion(k)))
|
||||
setSysRoot(qtVersion->qnxTarget());
|
||||
setSymbolFile(runConfig->localExecutableFilePath());
|
||||
}
|
||||
|
||||
|
||||
@@ -263,8 +263,10 @@ void QnxAttachDebugSupport::showProcessesDialog()
|
||||
const int pid = process.pid;
|
||||
// QString projectSourceDirectory = dlg.projectSource();
|
||||
QString localExecutable = dlg.localExecutable();
|
||||
if (localExecutable.isEmpty())
|
||||
localExecutable = runConfig->localExecutableFilePath();
|
||||
if (localExecutable.isEmpty()) {
|
||||
if (auto aspect = runConfig->extraAspect<SymbolFileAspect>())
|
||||
localExecutable = aspect->fileName().toString();
|
||||
}
|
||||
|
||||
auto runControl = new RunControl(runConfig, ProjectExplorer::Constants::DEBUG_RUN_MODE);
|
||||
auto debugger = new QnxAttachDebugSupport(runControl);
|
||||
|
||||
Reference in New Issue
Block a user