Commit f4994a5f authored by Nikolai Kosjar's avatar Nikolai Kosjar

CppTools: Always pass in header paths as native paths

Change-Id: I473c737107c14a4bc2c78b7c697eef02eb4bacff
Reviewed-by: Christian Kandeler's avatarChristian Kandeler <christian.kandeler@qt.io>
parent f3173514
......@@ -99,7 +99,7 @@ public:
optionsBuilder.addPredefinedMacrosAndHeaderPathsOptions();
optionsBuilder.addWrappedQtHeadersIncludePath();
optionsBuilder.addHeaderPathOptions(/*addAsNativePath*/ true);
optionsBuilder.addHeaderPathOptions();
optionsBuilder.addProjectConfigFileInclude();
optionsBuilder.addMsvcCompatibilityVersion();
......
......@@ -189,7 +189,7 @@ public:
optionsBuilder.addDefines(projectPart.projectDefines);
optionsBuilder.undefineClangVersionMacrosForMsvc();
optionsBuilder.undefineCppLanguageFeatureMacrosForMsvc2015();
optionsBuilder.addHeaderPathOptions(true);
optionsBuilder.addHeaderPathOptions();
optionsBuilder.addMsvcCompatibilityVersion();
if (type != ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID)
......
......@@ -101,7 +101,7 @@ void CompilerOptionsBuilder::enableExceptions()
add(QLatin1String("-fexceptions"));
}
void CompilerOptionsBuilder::addHeaderPathOptions(bool addAsNativePath)
void CompilerOptionsBuilder::addHeaderPathOptions()
{
typedef ProjectPartHeaderPath HeaderPath;
const QString defaultPrefix = includeOption();
......@@ -127,11 +127,7 @@ void CompilerOptionsBuilder::addHeaderPathOptions(bool addAsNativePath)
break;
}
const QString path = addAsNativePath
? QDir::toNativeSeparators(headerPath.path)
: headerPath.path;
result.append(prefix + path);
result.append(prefix + QDir::toNativeSeparators(headerPath.path));
}
m_options.append(result);
......
......@@ -46,7 +46,7 @@ public:
// Add options based on project part
virtual void addTargetTriple();
virtual void enableExceptions();
void addHeaderPathOptions(bool addAsNativePath = false);
void addHeaderPathOptions();
void addToolchainAndProjectDefines();
void addDefines(const QByteArray &defineDirectives);
virtual void addLanguageOption(ProjectFile::Kind fileKind);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment