# HG changeset patch # User Chris Cannam # Date 1330439786 0 # Node ID 65d77437b5e898f1e8392019ff121ab3496133c8 # Parent 1ff2a1bf0a40f18d50e994a5f2ef90cab5c9d511 Switch off debug output diff -r 1ff2a1bf0a40 -r 65d77437b5e8 src/fswatcher.cpp --- 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 -#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();