mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-13 00:47:57 -05:00
Use QFileSystemWatcher to reload the game list when a change is detected. (#2555)
* Added a refresh game directory option to the file menu * Make the game list watcher recursive and have it start watching from the initial load * Rework game list watcher to be thread safe * Fix code style issues
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QFileSystemWatcher>
|
||||
#include <QModelIndex>
|
||||
#include <QSettings>
|
||||
#include <QStandardItem>
|
||||
@ -46,8 +47,11 @@ private:
|
||||
void DonePopulating();
|
||||
|
||||
void PopupContextMenu(const QPoint& menu_location);
|
||||
void UpdateWatcherList(const std::string& path, unsigned int recursion);
|
||||
void RefreshGameDirectory();
|
||||
|
||||
QTreeView* tree_view = nullptr;
|
||||
QStandardItemModel* item_model = nullptr;
|
||||
GameListWorker* current_worker = nullptr;
|
||||
QFileSystemWatcher watcher;
|
||||
};
|
||||
|
Reference in New Issue
Block a user