forked from qt-creator/qt-creator
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user