Mercurial > hg > easyhg
diff src/fswatcher.cpp @ 562:65d77437b5e8
Switch off debug output
author | Chris Cannam |
---|---|
date | Tue, 28 Feb 2012 14:36:26 +0000 |
parents | 533519ebc0cb |
children | 0a094020c2d4 |
line wrap: on
line diff
--- a/src/fswatcher.cpp Mon Feb 27 17:25:50 2012 +0000 +++ b/src/fswatcher.cpp Tue Feb 28 14:36:26 2012 +0000 @@ -23,7 +23,7 @@ #include <deque> -#define DEBUG_FSWATCHER 1 +//#define DEBUG_FSWATCHER 1 /* * Watching the filesystem is trickier than it seems at first glance. @@ -66,8 +66,13 @@ { QMutexLocker locker(&m_mutex); if (m_workDirPath == path) return; - m_watcher.removePaths(m_watcher.directories()); - m_watcher.removePaths(m_watcher.files()); + // annoyingly, removePaths prints a warning if given an empty list + if (!m_watcher.directories().empty()) { + m_watcher.removePaths(m_watcher.directories()); + } + if (!m_watcher.files().empty()) { + m_watcher.removePaths(m_watcher.files()); + } m_workDirPath = path; addWorkDirectory(path); debugPrint();