forked from qt-creator/qt-creator
QmlDesigner: Fix ProjectStoragePathWatcher::checkForChangeInDirectory
The ids should be unique. Change-Id: Idee63b4631ca24602553af4caecb49bec7c97d69 Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -88,6 +88,8 @@ public:
|
||||
void checkForChangeInDirectory(SourceContextIds sourceContextIds) override
|
||||
{
|
||||
std::ranges::sort(sourceContextIds);
|
||||
auto removed = std::ranges::unique(sourceContextIds);
|
||||
sourceContextIds.erase(removed.begin(), removed.end());
|
||||
|
||||
addChangedPathForFilePath(sourceContextIds);
|
||||
}
|
||||
|
@@ -433,7 +433,7 @@ TEST_F(ProjectStoragePathWatcher, trigger_manual_two_notify_file_changes)
|
||||
ElementsAre(IdPaths{projectChunkId1, {sourceIds[0], sourceIds[1]}},
|
||||
IdPaths{projectChunkId2, {sourceIds[0], sourceIds[1], sourceIds[3]}})));
|
||||
|
||||
watcher.checkForChangeInDirectory({sourceIds[0].contextId(), sourceIds[1].contextId()});
|
||||
watcher.checkForChangeInDirectory({sourceIds[0].contextId(), sourceIds[2].contextId()});
|
||||
}
|
||||
|
||||
TEST_F(ProjectStoragePathWatcher, trigger_manual_notify_for_path_changes)
|
||||
|
Reference in New Issue
Block a user