From fc2f7b0df6b2429d45b169b51ce8d5c71ef68a4b Mon Sep 17 00:00:00 2001 From: James Rowe Date: Mon, 17 Apr 2017 20:53:40 -0600 Subject: Frontend: Prevent FileSystemWatcher from blocking UI thread Instead of tying the QFileSystemWatcher to the GameList and updating in the UI thread, this change moves it to the worker thread. Since it gets deleted and recreated as part of the worker thread, this prevents it from ever getting used from multiple threads (which is why it was originally done on the UI thread) --- src/citra_qt/game_list_p.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/citra_qt/game_list_p.h') diff --git a/src/citra_qt/game_list_p.h b/src/citra_qt/game_list_p.h index 3c11b6dd1..d1118ff7f 100644 --- a/src/citra_qt/game_list_p.h +++ b/src/citra_qt/game_list_p.h @@ -170,9 +170,15 @@ signals: * @param entry_items a list with `QStandardItem`s that make up the columns of the new entry. */ void EntryReady(QList entry_items); - void Finished(); + + /** + * After the worker has traversed the game directory looking for entries, this signal is emmited + * with a list of folders that should be watched for changes as well. + */ + void Finished(QStringList watch_list); private: + QStringList watch_list; QString dir_path; bool deep_scan; std::atomic_bool stop_processing; -- cgit v1.2.3