summaryrefslogtreecommitdiff
path: root/src/citra_qt/game_list.h
diff options
context:
space:
mode:
authorJames Rowe <jroweboy@gmail.com>2017-04-17 20:53:40 -0600
committerJames Rowe <jroweboy@gmail.com>2017-05-10 09:37:44 -0600
commitfc2f7b0df6b2429d45b169b51ce8d5c71ef68a4b (patch)
tree6989ddbc667f619badd214955741a0967dd97a8f /src/citra_qt/game_list.h
parent7325413cd8b4f02719ca0f87c8a70d4713333a98 (diff)
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)
Diffstat (limited to 'src/citra_qt/game_list.h')
-rw-r--r--src/citra_qt/game_list.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/citra_qt/game_list.h b/src/citra_qt/game_list.h
index d8f8bc5b6..4823a1296 100644
--- a/src/citra_qt/game_list.h
+++ b/src/citra_qt/game_list.h
@@ -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;
};