forked from qt-creator/qt-creator
C++: FastPreprocessor: Add only includes if there are none
For the case that the document is based upon another one (see Snapshot::preprocessedDocument(), the only client of FastPreprocessor) the FastPreprocessor added extra unresolved includes. Change-Id: I0a7719fa8806af59f87a48bc6914270efd653e84 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
This commit is contained in:
@@ -143,13 +143,6 @@ LineForNewIncludeDirective::LineForNewIncludeDirective(const QTextDocument *text
|
||||
m_includes = includes;
|
||||
}
|
||||
|
||||
// TODO: Remove this filter loop once FastPreprocessor::sourceNeeded does not add
|
||||
// extra includes anymore.
|
||||
for (int i = m_includes.count() - 1; i >= 0; --i) {
|
||||
if (!QFileInfo(m_includes.at(i).resolvedFileName()).isAbsolute())
|
||||
m_includes.removeAt(i);
|
||||
}
|
||||
|
||||
// Detect include style
|
||||
if (m_includeStyle == AutoDetect) {
|
||||
unsigned timesIncludeStyleChanged = 0;
|
||||
|
||||
Reference in New Issue
Block a user