forked from qt-creator/qt-creator
ClangCodeModel: Clean file paths resulting from "follow symbol"
Apparently, libclang can give us non-cleaned paths, which we never
noticed until ea215d612d.
We also restore the previous behavior of TextDocument::setFilePath() in
order to prevent similar regressions elsewhere.
Fixes: QTCREATORBUG-26561
Change-Id: I218ed29600e9fb6b299aa2ba0b9d1464f475c06b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -651,7 +651,7 @@ void TextDocument::setFilePath(const Utils::FilePath &newName)
|
||||
{
|
||||
if (newName == filePath())
|
||||
return;
|
||||
IDocument::setFilePath(newName.absoluteFilePath());
|
||||
IDocument::setFilePath(newName.absoluteFilePath().cleanPath());
|
||||
}
|
||||
|
||||
IDocument::ReloadBehavior TextDocument::reloadBehavior(ChangeTrigger state, ChangeType type) const
|
||||
|
||||
Reference in New Issue
Block a user