From 4bf11c7df6aac526a9272a827fa96d099253cbcf Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Mon, 24 Feb 2014 12:12:14 -0300 Subject: CppTools: Add diagnostic message for non-existent absolute paths Change-Id: I9a05a92c1adc37db0c918127715714d1f6d2a78d Reviewed-by: Erik Verbruggen --- src/plugins/cpptools/cpppreprocessor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/plugins/cpptools/cpppreprocessor.cpp') diff --git a/src/plugins/cpptools/cpppreprocessor.cpp b/src/plugins/cpptools/cpppreprocessor.cpp index dd185a7e39..b276885001 100644 --- a/src/plugins/cpptools/cpppreprocessor.cpp +++ b/src/plugins/cpptools/cpppreprocessor.cpp @@ -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; -- cgit v1.2.1