Commit 00c0fcf3 authored by Nikolai Kosjar's avatar Nikolai Kosjar
Browse files

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: default avatarErik Verbruggen <erik.verbruggen@digia.com>
parent fdf39819
......@@ -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();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment