PrismLauncher/launcher/WatchLock.h

16 lines
371 B
C
Raw Normal View History

2018-07-23 23:11:24 +01:00
#pragma once
#include <QFileSystemWatcher>
#include <QString>
2018-07-23 23:11:24 +01:00
struct WatchLock {
WatchLock(QFileSystemWatcher* watcher, const QString& directory) : m_watcher(watcher), m_directory(directory)
2018-07-23 23:11:24 +01:00
{
m_watcher->removePath(m_directory);
}
~WatchLock() { m_watcher->addPath(m_directory); }
QFileSystemWatcher* m_watcher;
2018-07-23 23:11:24 +01:00
QString m_directory;
};