GCC: Actually use sysroot for header path detection

Function signature was prepared for that on
4c6b794774 but it wasn't really used

Change-Id: I1ee7059a00f0441d42a117b8f8d2c8c776d93815
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
Orgad Shaneh
2012-09-05 09:59:13 +03:00
committed by Orgad Shaneh
parent 77b3de44e2
commit 948abf10ae
9 changed files with 20 additions and 17 deletions

View File

@@ -418,9 +418,10 @@ void AutotoolsProject::updateCppCodeModel()
QByteArray macros;
if (activeTarget()) {
ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(activeTarget()->kit());
ProjectExplorer::Kit *k = activeTarget()->kit();
ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(k);
if (tc) {
const QList<HeaderPath> allHeaderPaths = tc->systemHeaderPaths();
const QList<HeaderPath> allHeaderPaths = tc->systemHeaderPaths(SysRootKitInformation::sysRoot(k));
foreach (const HeaderPath &headerPath, allHeaderPaths) {
if (headerPath.kind() == HeaderPath::FrameworkHeaderPath)
allFrameworkPaths.append(headerPath.path());