mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-02-04 02:51:18 +01:00
On macOS, adding paths to QFileSystemWatcher can trigger immediate 'directoryChanged' signals (likely due to FSEvent behavior or .DS_Store updates during directory access). This caused a recursive loop where PopulateAsync would trigger itself indefinitely, leading to constant UI refreshing and high CPU usage. This fix addresses the issue by: 1. Temporarily blocking QFileSystemWatcher signals while the watch list is being populated. 2. Correcting the usage of QList::mid() in the loop (passing length instead of an end index) to avoid massive path duplication. These changes are isolated to macOS using #ifdef __APPLE__ to ensure no side effects on other platforms. Authored-by: rayman30 Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3418 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: rayman30 <silentbitdev@gmail.com> Co-committed-by: rayman30 <silentbitdev@gmail.com>