mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-11-30 22:43:00 -05:00
fix: Edit file tool take only absolute or relative path to file
This commit is contained in:
@ -70,4 +70,18 @@ QString ProjectUtils::findFileInProject(const QString &filename)
|
||||
return QString();
|
||||
}
|
||||
|
||||
QString ProjectUtils::getProjectRoot()
|
||||
{
|
||||
QList<ProjectExplorer::Project *> projects = ProjectExplorer::ProjectManager::projects();
|
||||
|
||||
if (!projects.isEmpty()) {
|
||||
auto project = projects.first();
|
||||
if (project) {
|
||||
return project->projectDirectory().toFSPathString();
|
||||
}
|
||||
}
|
||||
|
||||
return QString();
|
||||
}
|
||||
|
||||
} // namespace QodeAssist::Context
|
||||
|
||||
Reference in New Issue
Block a user