From 00c0fcf35376445384673b7c2982120eab1c866e Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Fri, 21 Mar 2014 10:13:31 -0300 Subject: CppTools: Resolve absolute files in working copy always successfully ...since we can always provide the contents for such files. This fixes the soft assert SOFT ASSERT: "document()" in file src/plugins/cpptools/cppsnapshotupdater.cpp, line 199 that occurs if you Follow Symbol on an include directive of the type "ui_*.h" file that is not yet generated on disk. Change-Id: I1e40db95a648a0570c6ccbcf5475691094097e18 Reviewed-by: Erik Verbruggen --- src/plugins/cpptools/cpppreprocessor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/plugins/cpptools/cpppreprocessor.cpp') diff --git a/src/plugins/cpptools/cpppreprocessor.cpp b/src/plugins/cpptools/cpppreprocessor.cpp index 7bc50c5f9e..e5c9c9dbd3 100644 --- a/src/plugins/cpptools/cpppreprocessor.cpp +++ b/src/plugins/cpptools/cpppreprocessor.cpp @@ -201,8 +201,11 @@ bool CppPreprocessor::getFileContents(const QString &absoluteFilePath, bool CppPreprocessor::checkFile(const QString &absoluteFilePath) const { - if (absoluteFilePath.isEmpty() || m_included.contains(absoluteFilePath)) + if (absoluteFilePath.isEmpty() + || m_included.contains(absoluteFilePath) + || m_workingCopy.contains(absoluteFilePath)) { return true; + } const QFileInfo fileInfo(absoluteFilePath); return fileInfo.isFile() && fileInfo.isReadable(); -- cgit v1.2.1