diff options
author | Erik Verbruggen <erik@verbruggen.consulting> | 2021-10-07 21:45:36 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2021-10-27 15:30:39 +0300 |
commit | 93f8c1f0ab060900b5403d9eb77cc89fc5ae029d (patch) | |
tree | 8555daad95e16ddad1b974a24beeb105ce8a8a26 | |
parent | f568951c8da2cc7effb4db5778fd1fd69d111380 (diff) |
Linux: make FileWatcher debug messages more detailed
... for subfolder scanning
-rw-r--r-- | src/gui/folderwatcher_linux.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/folderwatcher_linux.cpp b/src/gui/folderwatcher_linux.cpp index fa5154408..4cdcc5afb 100644 --- a/src/gui/folderwatcher_linux.cpp +++ b/src/gui/folderwatcher_linux.cpp @@ -45,8 +45,11 @@ FolderWatcherPrivate::FolderWatcherPrivate(FolderWatcher *p, const QString &path // attention: result list passed by reference! bool FolderWatcherPrivate::findFoldersBelow(const QDir &dir, QStringList &fullList) { - if (!(dir.exists() && dir.isReadable())) { - qCDebug(lcFolderWatcher) << "Non existing path coming in: " << dir.absolutePath(); + if (!dir.exists()) { + qCDebug(lcFolderWatcher) << " - non existing path coming in: " << dir.absolutePath(); + return false; + } else if (!dir.isReadable()) { + qCDebug(lcFolderWatcher) << " - path without read permissions coming in: " << dir.absolutePath(); return false; } @@ -97,7 +100,8 @@ void FolderWatcherPrivate::slotAddFolderRecursive(const QString &path) QStringList allSubfolders; if (!findFoldersBelow(QDir(path), allSubfolders)) { - qCWarning(lcFolderWatcher) << "Could not traverse all sub folders"; + qCWarning(lcFolderWatcher).nospace() << "Could not traverse all sub folders of '" + << path << "'"; } for (const auto &subfolder : allSubfolders) { @@ -117,6 +121,8 @@ void FolderWatcherPrivate::slotAddFolderRecursive(const QString &path) if (subdirCount > 0) { qCDebug(lcFolderWatcher) << " `-> and" << subdirCount << "subdirectories"; } + + qCDebug(lcFolderWatcher) << " --- Finished scanning" << path; } void FolderWatcherPrivate::slotReceivedNotification(int fd) |