]> git.lyx.org Git - lyx.git/commitdiff
Cosmetic
authorGuillaume Munch <gm@lyx.org>
Sat, 18 Mar 2017 23:09:02 +0000 (00:09 +0100)
committerGuillaume Munch <gm@lyx.org>
Sun, 19 Mar 2017 13:41:17 +0000 (14:41 +0100)
src/support/FileMonitor.cpp
src/support/FileMonitor.h

index 50337cb288db871f4c0cec6745abb39d1027c887..f1446a3aba6bde7175e769f1b80cef960b1cfadc 100644 (file)
@@ -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: "
index e2bbb1b1feba5310a321a9c5cbeeb7097c677376..0d8129e9fb6f387b37307eed705577957900a09d 100644 (file)
@@ -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_;
 };