diff options
Diffstat (limited to 'src/plugins/cpptools/cppmodelmanager.cpp')
-rw-r--r-- | src/plugins/cpptools/cppmodelmanager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp index 5adc395870..38c4e61c8a 100644 --- a/src/plugins/cpptools/cppmodelmanager.cpp +++ b/src/plugins/cpptools/cppmodelmanager.cpp @@ -379,8 +379,8 @@ QString CppPreprocessor::tryIncludeFile(QString &fileName, IncludeType type) } } - foreach (const QString &includePath, m_includePaths) { - QString path = includePath; + for (int i = m_includePaths.size() - 1; i != -1; --i) { + QString path = m_includePaths.at(i); path += QLatin1Char('/'); path += fileName; path = QDir::cleanPath(path); @@ -532,7 +532,7 @@ void CppPreprocessor::sourceNeeded(QString &fileName, IncludeType type, return; QString contents = tryIncludeFile(fileName, type); - + fileName = QDir::cleanPath(fileName); if (m_currentDoc) { m_currentDoc->addIncludeFile(fileName, line); |