forked from qt-creator/qt-creator
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 <erik.verbruggen@digia.com>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user