commit c779e9806ef83f899756d12a01f06d3ca3aaeb7e
Author: Guillaume Munch <g...@lyx.org>
Date:   Sun Mar 19 00:09:02 2017 +0100

    Cosmetic
---
 src/support/FileMonitor.cpp |    5 +++--
 src/support/FileMonitor.h   |   16 ++++++++--------
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/src/support/FileMonitor.cpp b/src/support/FileMonitor.cpp
index 50337cb..f1446a3 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 e2bbb1b..0d8129e 100644
--- a/src/support/FileMonitor.h
+++ b/src/support/FileMonitor.h
@@ -74,13 +74,13 @@ typedef std::unique_ptr<ActiveFileMonitor> 
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<FileMonitorGuard> 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<std::string, std::weak_ptr<FileMonitorGuard>> store_;
-       // This class is a wrapper for QFileSystemWatcher
+       /// This class is a wrapper for QFileSystemWatcher
        std::unique_ptr<QFileSystemWatcher> 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<FileMonitorGuard> const monitor_;
-       //
+       ///
        std::weak_ptr<FileMonitorBlockerGuard> blocker_;
 };
 

Reply via email to