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:
Nikolai Kosjar
2014-02-24 12:12:14 -03:00
parent aa796a9fc0
commit 4bf11c7df6
2 changed files with 7 additions and 4 deletions

View File

@@ -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;