forked from qt-creator/qt-creator
CppTools: Add diagnostic message for non-existent absolute paths
Change-Id: I9a05a92c1adc37db0c918127715714d1f6d2a78d Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
@@ -235,10 +235,12 @@ QString CppPreprocessor::cleanPath(const QString &path)
|
||||
|
||||
QString CppPreprocessor::resolveFile_helper(const QString &fileName, IncludeType type)
|
||||
{
|
||||
const QFileInfo fileInfo(fileName);
|
||||
if (isInjectedFile(fileName) || fileInfo.isAbsolute())
|
||||
if (isInjectedFile(fileName))
|
||||
return fileName;
|
||||
|
||||
if (QFileInfo(fileName).isAbsolute())
|
||||
return checkFile(fileName) ? fileName : QString();
|
||||
|
||||
if (type == IncludeLocal && m_currentDoc) {
|
||||
const QFileInfo currentFileInfo(m_currentDoc->fileName());
|
||||
const QString path = cleanPath(currentFileInfo.absolutePath()) + fileName;
|
||||
|
||||
Reference in New Issue
Block a user