show only a summary of subdirectories

This commit is contained in:
Duncan Mac-Vicar P 2011-03-29 22:23:42 +02:00
Родитель 1b19507ca8
Коммит 9d09b7ea5f
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -92,6 +92,7 @@ QStringList FolderWatcher::folders() const
void FolderWatcher::slotAddFolderRecursive(const QString &path)
{
int subdirs = 0;
qDebug() << "(+) Watcher:" << path;
_inotify->addPath(path);
QStringList watchedFolders(_inotify->directories());
@ -100,12 +101,15 @@ void FolderWatcher::slotAddFolderRecursive(const QString &path)
while (subfoldersIt.hasNext()) {
QDir folder (subfoldersIt.next());
if (folder.exists() && !watchedFolders.contains(folder.path())) {
qDebug() << "(+) Watcher:" << folder.path();
subdirs++;
//qDebug() << "(+) Watcher:" << folder.path();
_inotify->addPath(folder.path());
}
else
qDebug() << "Discarded:" << folder.path();
qDebug() << " `-> discarded:" << folder.path();
}
if (subdirs >0)
qDebug() << " `-> and" << subdirs << "subdirectories";
}
void FolderWatcher::slotINotifyEvent(int mask, int cookie, const QString &path)