forked from qt-creator/qt-creator
CppEditor: Switch to FilePath in IndexItem
... and fix fallout. Change-Id: I45d27146806bdcb5ceb728b710eca51c7cd32ee2 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -2071,17 +2071,17 @@ void AddIncludeForUndefinedIdentifier::match(const CppQuickFixInterface &interfa
|
||||
indexItems << info;
|
||||
|
||||
Snapshot localForwardHeaders = forwardHeaders;
|
||||
localForwardHeaders.insert(interface.snapshot().document(info->fileName()));
|
||||
Utils::FilePaths headerAndItsForwardingHeaders;
|
||||
headerAndItsForwardingHeaders << Utils::FilePath::fromString(info->fileName());
|
||||
headerAndItsForwardingHeaders += localForwardHeaders.filesDependingOn(info->fileName());
|
||||
localForwardHeaders.insert(interface.snapshot().document(info->filePath()));
|
||||
FilePaths headerAndItsForwardingHeaders;
|
||||
headerAndItsForwardingHeaders << info->filePath();
|
||||
headerAndItsForwardingHeaders += localForwardHeaders.filesDependingOn(info->filePath());
|
||||
|
||||
for (const Utils::FilePath &header : std::as_const(headerAndItsForwardingHeaders)) {
|
||||
for (const FilePath &header : std::as_const(headerAndItsForwardingHeaders)) {
|
||||
const QString include = findShortestInclude(currentDocumentFilePath,
|
||||
header.toString(),
|
||||
headerPaths);
|
||||
if (include.size() > 2) {
|
||||
const QString headerFileName = Utils::FilePath::fromString(info->fileName()).fileName();
|
||||
const QString headerFileName = info->filePath().fileName();
|
||||
QTC_ASSERT(!headerFileName.isEmpty(), break);
|
||||
|
||||
int priority = 0;
|
||||
|
||||
Reference in New Issue
Block a user