mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-13 00:57:57 -05:00
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)
This commit is contained in:
@ -85,10 +85,9 @@ private slots:
|
||||
private:
|
||||
void AddEntry(const QList<QStandardItem*>& entry_items);
|
||||
void ValidateEntry(const QModelIndex& item);
|
||||
void DonePopulating();
|
||||
void DonePopulating(QStringList watch_list);
|
||||
|
||||
void PopupContextMenu(const QPoint& menu_location);
|
||||
void UpdateWatcherList(const std::string& path, unsigned int recursion);
|
||||
void RefreshGameDirectory();
|
||||
bool containsAllWords(QString haystack, QString userinput);
|
||||
|
||||
@ -98,5 +97,5 @@ private:
|
||||
QTreeView* tree_view = nullptr;
|
||||
QStandardItemModel* item_model = nullptr;
|
||||
GameListWorker* current_worker = nullptr;
|
||||
QFileSystemWatcher watcher;
|
||||
QFileSystemWatcher* watcher = nullptr;
|
||||
};
|
||||
|
Reference in New Issue
Block a user