Add display search results using relative paths to project root

Task-number: QTCREATORBUG-29462
Change-Id: Ic5d597846cfcc6589cbf1b81151e05c95ee8fab0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Xavier BESSON
2023-12-14 10:50:49 +01:00
committed by Xavier BESSON (Personal)
parent 905eaf8b1e
commit 2796e69ab5
10 changed files with 112 additions and 1 deletions

View File

@@ -1093,6 +1093,25 @@ void ICore::restart()
exit();
}
/*!
\internal
*/
void ICore::setRelativePathToProjectFunction(const std::function<FilePath(const FilePath &)> &func)
{
m_core->m_relativePathToProject = func;
}
/*!
\internal
*/
FilePath ICore::pathRelativeToActiveProject(const FilePath &path)
{
if (m_core->m_relativePathToProject)
return m_core->m_relativePathToProject(path);
return path;
}
/*!
\internal
*/