Editor: centrally emit filesChangedInternally after refactorings

...instead of relying on the surrounding code of the refactoring to emit the signal.
This also ensures that the signal is only emitted for files that are not opened inside
a TextEditor.

Change-Id: I6223362864014c691962d895b864f9f44c36e035
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
David Schulz
2023-11-16 09:48:38 +01:00
parent 7819fc5dfb
commit b960fb4481
4 changed files with 4 additions and 14 deletions

View File

@@ -252,10 +252,8 @@ void ClangdFindReferences::Private::handleRenameRequest(
{
const Utils::FilePaths filePaths = BaseFileFind::replaceAll(newSymbolName, checkedItems,
preserveCase);
if (!filePaths.isEmpty()) {
DocumentManager::notifyFilesChangedInternally(filePaths);
if (!filePaths.isEmpty())
SearchResultWindow::instance()->hide();
}
const auto renameFilesCheckBox = qobject_cast<QCheckBox *>(search->additionalReplaceWidget());
QTC_ASSERT(renameFilesCheckBox, return);