mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +00:00
LibGUI: Use Core::FileWatcher in FileSystemModel
This replaces the manual watch_file and Notifier handling with the new Core::FileWatcher wrapper, which reduces the manual handling and makes the code easier to reason about :^)
This commit is contained in:
parent
2acbb811b1
commit
c98ad27803
2 changed files with 18 additions and 24 deletions
|
@ -29,7 +29,7 @@
|
|||
#include <AK/HashMap.h>
|
||||
#include <AK/NonnullOwnPtrVector.h>
|
||||
#include <LibCore/DateTime.h>
|
||||
#include <LibCore/Notifier.h>
|
||||
#include <LibCore/FileWatcher.h>
|
||||
#include <LibGUI/Model.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -63,7 +63,7 @@ public:
|
|||
};
|
||||
|
||||
struct Node {
|
||||
~Node() { close(m_watch_fd); }
|
||||
~Node() { }
|
||||
|
||||
String name;
|
||||
String symlink_target;
|
||||
|
@ -106,8 +106,7 @@ public:
|
|||
|
||||
bool m_selected { false };
|
||||
|
||||
int m_watch_fd { -1 };
|
||||
RefPtr<Core::Notifier> m_notifier;
|
||||
RefPtr<Core::FileWatcher> m_file_watcher;
|
||||
|
||||
int m_error { 0 };
|
||||
bool m_parent_of_root { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue