Add log messages for LockWatcher use #5190

This commit is contained in:
Christian Kamm 2016-09-22 09:57:42 +02:00
parent 85b8ab178e
commit 0cea3d85f5

View file

@ -15,6 +15,7 @@
#include "filesystem.h" #include "filesystem.h"
#include <QTimer> #include <QTimer>
#include <QDebug>
using namespace OCC; using namespace OCC;
@ -30,6 +31,7 @@ LockWatcher::LockWatcher(QObject* parent)
void LockWatcher::addFile(const QString& path) void LockWatcher::addFile(const QString& path)
{ {
qDebug() << "Watching for lock of" << path << "being released";
_watchedPaths.insert(path); _watchedPaths.insert(path);
} }
@ -39,6 +41,7 @@ void LockWatcher::checkFiles()
foreach (const QString& path, _watchedPaths) { foreach (const QString& path, _watchedPaths) {
if (!FileSystem::isFileLocked(path)) { if (!FileSystem::isFileLocked(path)) {
qDebug() << "Lock of" << path << "was released";
emit fileUnlocked(path); emit fileUnlocked(path);
unlocked.insert(path); unlocked.insert(path);
} }