FileInProjectFinder/Debugger: Use Utils::FileName for sysroot

Change-Id: Id937f927ba6137fd04f742f31d1b260afbe42db4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Ulf Hermann
2018-08-21 17:46:47 +02:00
parent 767137157e
commit 4ecc46626b
12 changed files with 32 additions and 31 deletions

View File

@@ -1615,7 +1615,7 @@ QString GdbEngine::cleanupFullName(const QString &fileName)
if (!boolSetting(AutoEnrichParameters))
return cleanFilePath;
const QString sysroot = runParameters().sysRoot;
const QString sysroot = runParameters().sysRoot.toString();
if (QFileInfo(cleanFilePath).isReadable())
return cleanFilePath;
if (!sysroot.isEmpty() && fileName.startsWith('/')) {
@@ -3701,10 +3701,10 @@ void GdbEngine::setupEngine()
}
if (!rp.sysRoot.isEmpty()) {
runCommand({"set sysroot " + rp.sysRoot});
runCommand({"set sysroot " + rp.sysRoot.toString()});
// sysroot is not enough to correctly locate the sources, so explicitly
// relocate the most likely place for the debug source
runCommand({"set substitute-path /usr/src " + rp.sysRoot + "/usr/src"});
runCommand({"set substitute-path /usr/src " + rp.sysRoot.toString() + "/usr/src"});
}
//QByteArray ba = QFileInfo(sp.dumperLibrary).path().toLocal8Bit();