diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2013-09-30 14:37:50 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@digia.com> | 2013-10-01 13:03:47 +0200 |
commit | 8c79d5bc23e4b555625dfa368ca9f74e6d14540b (patch) | |
tree | 3941cb912ba455d01a31f7ff4746481d9999a2d4 /src/plugins/cpptools/cpppreprocessor.cpp | |
parent | 02072109bc46ca2a285b109521a14739eb2185ea (diff) | |
download | qt-creator-8c79d5bc23e4b555625dfa368ca9f74e6d14540b.tar.gz |
C++: add code-model support for defines-per-editor.
The UI side will come in another commit.
Change-Id: I1038a438587fe4cef70408f7f627d08837fc192d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Diffstat (limited to 'src/plugins/cpptools/cpppreprocessor.cpp')
-rw-r--r-- | src/plugins/cpptools/cpppreprocessor.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/cpptools/cpppreprocessor.cpp b/src/plugins/cpptools/cpppreprocessor.cpp index 1e3f5b1bf0..f60c853b83 100644 --- a/src/plugins/cpptools/cpppreprocessor.cpp +++ b/src/plugins/cpptools/cpppreprocessor.cpp @@ -223,10 +223,15 @@ QString CppPreprocessor::cleanPath(const QString &path) return result; } +static inline bool isInjectedFile(const QString &fileName) +{ + return fileName.startsWith(QLatin1Char('<')) && fileName.endsWith(QLatin1Char('>')); +} + QString CppPreprocessor::resolveFile_helper(const QString &fileName, IncludeType type) { const QFileInfo fileInfo(fileName); - if (fileName == Preprocessor::configurationFileName || fileInfo.isAbsolute()) + if (isInjectedFile(fileName) || fileInfo.isAbsolute()) return fileName; if (type == IncludeLocal && m_currentDoc) { |