Explorar o código

LibCore: Allow subclassing FileWatcher

This will be handy for platforms which need to be able to store extra
OS-specific members. For example, macOS needs to store a dispatch queue,
and event stream, etc.
Timothy Flynn %!s(int64=2) %!d(string=hai) anos
pai
achega
0e7a48bd7d
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      Userland/Libraries/LibCore/FileWatcher.h

+ 2 - 2
Userland/Libraries/LibCore/FileWatcher.h

@@ -69,7 +69,7 @@ public:
     Optional<FileWatcherEvent> wait_for_event();
 };
 
-class FileWatcher final : public FileWatcherBase
+class FileWatcher : public FileWatcherBase
     , public RefCounted<FileWatcher> {
     AK_MAKE_NONCOPYABLE(FileWatcher);
 
@@ -79,7 +79,7 @@ public:
 
     Function<void(FileWatcherEvent const&)> on_change;
 
-private:
+protected:
     FileWatcher(int watcher_fd, NonnullRefPtr<Notifier>);
 
     NonnullRefPtr<Notifier> m_notifier;