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>
This commit is contained in:
Erik Verbruggen
2013-09-30 14:37:50 +02:00
parent 02072109bc
commit 8c79d5bc23
5 changed files with 132 additions and 2 deletions

View File

@@ -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) {