aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cpptools
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@digia.com>2014-03-21 10:13:31 -0300
committerNikolai Kosjar <nikolai.kosjar@digia.com>2014-03-27 15:41:15 +0100
commit00c0fcf35376445384673b7c2982120eab1c866e (patch)
tree6c79efc6304456eaf6b130748c8f51ddbcdb0335 /src/plugins/cpptools
parentfdf39819df9ca29e09e75c8e6556917f313c4adc (diff)
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>
Diffstat (limited to 'src/plugins/cpptools')
-rw-r--r--src/plugins/cpptools/cpppreprocessor.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/cpptools/cpppreprocessor.cpp b/src/plugins/cpptools/cpppreprocessor.cpp
index 7bc50c5f9e9..e5c9c9dbd3c 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();