forked from qt-creator/qt-creator
Debugger: Fix automatic source mapping for Qt
- The QtVersion::sourcePath() was wrong because QT_INSTALL_PREFIX/src doesn't return the right path. Work around by checking if sources are found, and otherwise trying the location that we know the installers to put them. - Pass the sourcePath along to the debugger run control, and use that instead of looking for qmake in the PATH (which fails because it is not in PATH). Fixes: QTCREATORBUG-28950 Change-Id: Iffa262d6c87dbc979c449d43cd4a85e1320bcd37 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -863,8 +863,10 @@ DebuggerRunTool::DebuggerRunTool(RunControl *runControl, AllowTerminal allowTerm
|
||||
m_runParameters.debugger = DebuggerKitAspect::runnable(kit);
|
||||
m_runParameters.cppEngineType = DebuggerKitAspect::engineType(kit);
|
||||
|
||||
if (QtSupport::QtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(kit))
|
||||
if (QtSupport::QtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(kit)) {
|
||||
m_runParameters.qtPackageSourceLocation = qtVersion->qtPackageSourcePath().toString();
|
||||
m_runParameters.qtSourceLocation = qtVersion->sourcePath();
|
||||
}
|
||||
|
||||
if (auto aspect = runControl->aspect<DebuggerRunConfigurationAspect>()) {
|
||||
if (!aspect->useCppDebugger)
|
||||
|
Reference in New Issue
Block a user