CppEditor: Fix renaming etc in non-project sources

Was probably broken in 33108795d6.

Change-Id: I54e2a668c00b132e3a7757be9e5ab294427f1f6d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2021-11-09 14:16:14 +01:00
parent 66900b1deb
commit 2c1adffb11

View File

@@ -57,7 +57,7 @@ QString ProjectPart::projectFileLocation() const
bool ProjectPart::belongsToProject(const ProjectExplorer::Project *project) const
{
return project && topLevelProject == project->projectFilePath();
return project ? topLevelProject == project->projectFilePath() : !hasProject();
}
QByteArray ProjectPart::readProjectConfigFile(const QString &projectConfigFile)