[desktop] Clean up game list code, fix external watcher crash, and fix macOS flickering (#4106)

- Remove unnecessary icon update code (the UI reloads this stuff anyways); test on Windows please
- Cleaned up a bunch of duplicated/unused code within the game list
- Fix the game list constantly reloading on macOS
  * When you reconstruct the entire directory list on the watcher the directoryChanged signal fires on macOS--seems like a behavioral change that occurred somewhere in the 6.8 release cycle--and it would enter an infinite loop very quickly
  * To fix this, only the differences between the current and old watch list are accounted for on both ends.
  * Since this bug is now fixed, macOS uses Qt 6.11.1 now. Should theoretically improve our situation.
- Fix the external content watcher crashing; the worker would attempt to read files that didn't exist without any bounds since its cache was still pointing to that file.

This supersedes and replaces #4099.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4106
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
crueter
2026-06-19 22:55:29 +02:00
parent 7c0e993b5b
commit 102d254530
12 changed files with 181 additions and 277 deletions
+3 -6
View File
@@ -3,11 +3,11 @@
#pragma once
#include <memory>
#include <QFileSystemWatcher>
#include <QStandardItemModel>
#include <QStringList>
#include <QVector>
#include <memory>
#include "common/common_types.h"
#include "frontend_common/play_time_manager.h"
@@ -52,10 +52,6 @@ public:
void DonePopulating(const QStringList& watch_list);
void PopulateAsync(QVector<UISettings::GameDir>& game_dirs);
// Stops and joins the running populate worker, if any. Must be called before rebuilding the
// content providers (CreateFactories), otherwise the worker keeps scanning a cache that is
// being torn down underneath it.
void StopWorker();
void WorkerEvent();
bool IsEmpty() const;
@@ -68,7 +64,6 @@ public:
void LoadCompatibilityList();
void OnUpdateThemedIcons();
void RetranslateUI();
QFileSystemWatcher* GetWatcher() const;
@@ -80,6 +75,7 @@ public:
signals:
void ShowList(bool show);
void PopulatingCompleted(const QStringList& watch_list);
void PopulatingStarted();
void SaveConfig();
private:
@@ -87,6 +83,7 @@ private:
void AddFavorite(u64 program_id);
void RemoveFavorite(u64 program_id);
void Repopulate();
bool m_flat = false;