From: Guillaume Munch Date: Sat, 18 Mar 2017 23:09:02 +0000 (+0100) Subject: Cosmetic X-Git-Tag: 2.3.0alpha1~198 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=c779e9806ef83f899756d12a01f06d3ca3aaeb7e;p=lyx.git Cosmetic --- diff --git a/src/support/FileMonitor.cpp b/src/support/FileMonitor.cpp index 50337cb288..f1446a3aba 100644 --- a/src/support/FileMonitor.cpp +++ b/src/support/FileMonitor.cpp @@ -121,14 +121,15 @@ void FileMonitorGuard::refresh() if(!qwatcher_->files().contains(qfilename)) { bool exists = QFile(qfilename).exists(); #if (QT_VERSION >= 0x050000) - if (!exists || !qwatcher_->addPath(qfilename)) { + if (!exists || !qwatcher_->addPath(qfilename)) #else auto add_path = [&]() { qwatcher_->addPath(qfilename); return qwatcher_->files().contains(qfilename); }; - if (!exists || !add_path()) { + if (!exists || !add_path()) #endif + { if (exists) LYXERR(Debug::FILES, "Could not add path to QFileSystemWatcher: " diff --git a/src/support/FileMonitor.h b/src/support/FileMonitor.h index e2bbb1b1fe..0d8129e9fb 100644 --- a/src/support/FileMonitor.h +++ b/src/support/FileMonitor.h @@ -74,13 +74,13 @@ typedef std::unique_ptr ActiveFileMonitorPtr; class FileSystemWatcher { public: - // as described above + /// as described above static FileMonitorPtr monitor(FileName const & filename); /// same but with an ActiveFileMonitor static ActiveFileMonitorPtr activeMonitor(FileName const & filename, int interval = 10000); - // Output whether the paths tracked by qwatcher_ and the active - // FileMonitorGuards are in correspondence. + /// Output whether the paths tracked by qwatcher_ and the active + /// FileMonitorGuards are in correspondence. static void debug(); private: FileSystemWatcher(); @@ -88,9 +88,9 @@ private: static FileSystemWatcher & instance(); /// std::shared_ptr getGuard(FileName const & filename); - // Caches the monitor guards but allow them to be destroyed + /// Caches the monitor guards but allow them to be destroyed std::map> store_; - // This class is a wrapper for QFileSystemWatcher + /// This class is a wrapper for QFileSystemWatcher std::unique_ptr const qwatcher_; }; @@ -189,11 +189,11 @@ protected Q_SLOTS: void reconnectToFileMonitorGuard(); private: - // boost signal + /// boost signal sig fileChanged_; - // the unique watch for our file + /// the unique watch for our file std::shared_ptr const monitor_; - // + /// std::weak_ptr blocker_; };