forked from qt-creator/qt-creator
CppEditor: FilePathify some of the refactoring operations
... and adjust surrounding code. Change-Id: I1d36e5a0c6ba14a1d9b8fd59340f1bb2a1e45ad1 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -1726,17 +1726,17 @@ void CppModelManager::onAboutToLoadSession()
|
||||
GC();
|
||||
}
|
||||
|
||||
QSet<QString> CppModelManager::dependingInternalTargets(const Utils::FilePath &file) const
|
||||
QSet<QString> CppModelManager::dependingInternalTargets(const FilePath &file) const
|
||||
{
|
||||
QSet<QString> result;
|
||||
const Snapshot snapshot = this->snapshot();
|
||||
QTC_ASSERT(snapshot.contains(file), return result);
|
||||
bool wasHeader;
|
||||
const QString correspondingFile
|
||||
= correspondingHeaderOrSource(file.toString(), &wasHeader, CacheUsage::ReadOnly);
|
||||
const Utils::FilePaths dependingFiles = snapshot.filesDependingOn(
|
||||
wasHeader ? file : Utils::FilePath::fromString(correspondingFile));
|
||||
for (const Utils::FilePath &fn : std::as_const(dependingFiles)) {
|
||||
const FilePath correspondingFile
|
||||
= correspondingHeaderOrSource(file, &wasHeader, CacheUsage::ReadOnly);
|
||||
const FilePaths dependingFiles = snapshot.filesDependingOn(
|
||||
wasHeader ? file : correspondingFile);
|
||||
for (const FilePath &fn : std::as_const(dependingFiles)) {
|
||||
for (const ProjectPart::ConstPtr &part : projectPart(fn))
|
||||
result.insert(part->buildSystemTarget);
|
||||
}
|
||||
|
Reference in New Issue
Block a user