Commit 663b1667 authored by dt's avatar dt
Browse files

Take QMAKE_CXXFLAGS into account for additional INCLUDEPATHS

This also fixes pkg-config support for the code model.

Task-Nr: QTCREATORBUG-976
parent ee091aa9
......@@ -1349,9 +1349,14 @@ QStringList Qt4ProFileNode::mocDirPaths(ProFileReader *reader) const
QStringList Qt4ProFileNode::includePaths(ProFileReader *reader) const
{
QStringList paths;
paths = reader->absolutePathValues(QLatin1String("INCLUDEPATH"),
m_projectDir);
paths << uiDirPaths(reader) << mocDirPaths(reader);
foreach (const QString &cxxflags, m_readerExact->values("QMAKE_CXXFLAGS")) {
if (cxxflags.startsWith("-I"))
paths.append(cxxflags.mid(2));
}
paths.append(reader->absolutePathValues(QLatin1String("INCLUDEPATH"), m_projectDir));
paths << mocDirPaths(reader) << uiDirPaths(reader);
paths.removeDuplicates();
return paths;
}
......
Supports Markdown
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