feat: Add edit file tool (#249)

* feat: Add edit file tool
* feat: Add icons for action buttons
This commit is contained in:
Petr Mironychev
2025-11-03 08:56:52 +01:00
committed by GitHub
parent e7110810f8
commit 9b90aaa06e
39 changed files with 3732 additions and 344 deletions

View File

@ -51,4 +51,23 @@ bool ProjectUtils::isFileInProject(const QString &filePath)
return false;
}
QString ProjectUtils::findFileInProject(const QString &filename)
{
QList<ProjectExplorer::Project *> projects = ProjectExplorer::ProjectManager::projects();
for (auto project : projects) {
if (!project)
continue;
Utils::FilePaths projectFiles = project->files(ProjectExplorer::Project::SourceFiles);
for (const auto &projectFile : std::as_const(projectFiles)) {
if (projectFile.fileName() == filename) {
return projectFile.toFSPathString();
}
}
}
return QString();
}
} // namespace QodeAssist::Context