X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fsupport%2FFileMonitor.h;h=3f0b91785b3a56917b946b52344781942551d519;hb=0a9735c5f7bbbaa24ac2e3e4fa745c6dfbc95a18;hp=9523bf1e7d5a158cff52c73c79aaf4c6832b2432;hpb=8e6e970d7ba017dba14bdb821f4c4489665d947c;p=lyx.git diff --git a/src/support/FileMonitor.h b/src/support/FileMonitor.h index 9523bf1e7d..3f0b91785b 100644 --- a/src/support/FileMonitor.h +++ b/src/support/FileMonitor.h @@ -15,8 +15,6 @@ #ifndef FILEMONITOR_H #define FILEMONITOR_H -#include -#include #include namespace lyx { @@ -24,14 +22,17 @@ namespace support { class FileName; -class FileMonitor : boost::noncopyable { +class FileMonitor +{ public: /** Once monitoring begins, the file will be monitored every * interval ms. + * + * FIXME: rewrite and simplify using an encapsulation of QFileSystemWatcher. */ FileMonitor(FileName const & file_with_path, int interval); - /// Define an empty d-tor out-of-line to keep boost::scoped_ptr happy. + /// Destructor ~FileMonitor(); /// @@ -60,11 +61,14 @@ public: boost::signals::connection connect(slot_type const &) const; private: + /// noncopyable + FileMonitor(FileMonitor const &); + void operator=(FileMonitor const &); + /// Use the Pimpl idiom to hide the internals. class Impl; - /// The pointer never changes although *pimpl_'s contents may. - boost::scoped_ptr const pimpl_; + Impl * const pimpl_; }; } // namespace support