Debugger: Always add Qt install source mappings for gdb.

As it fails for MinGW.

Task-number: QTCREATORBUG-4132
Reviewed-by: hjk
This commit is contained in:
Friedemann Kleint
2011-03-18 10:02:07 +01:00
parent d87f03825d
commit 8ff480881a
6 changed files with 43 additions and 5 deletions

View File

@@ -374,5 +374,24 @@ void DebuggerSourcePathMappingWidget::slotEditTargetFieldChanged()
}
}
/* Merge settings for an installed Qt (unless another setting
* is already in the map. */
DebuggerSourcePathMappingWidget::SourcePathMap
DebuggerSourcePathMappingWidget::mergePlatformQtPath(const QString &qtInstallPath,
const SourcePathMap &in)
{
SourcePathMap rc = in;
const size_t buildPathCount = sizeof(qtBuildPaths)/sizeof(const char *);
if (qtInstallPath.isEmpty() || buildPathCount == 0)
return rc;
for (size_t i = 0; i < buildPathCount; i++) {
const QString buildPath = QString::fromLatin1(qtBuildPaths[i]);
if (!rc.contains(buildPath)) // Do not overwrite user settings.
rc.insert(buildPath, qtInstallPath);
}
return rc;
}
} // namespace Internal
} // namespace Debugger