PrismLauncher/launcher/WatchLock.h
Sefa Eyeoglu 1d468ac35a
chore: reformat
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2023-08-02 18:35:35 +02:00

16 lines
371 B
C

#pragma once
#include <QFileSystemWatcher>
#include <QString>
struct WatchLock {
WatchLock(QFileSystemWatcher* watcher, const QString& directory) : m_watcher(watcher), m_directory(directory)
{
m_watcher->removePath(m_directory);
}
~WatchLock() { m_watcher->addPath(m_directory); }
QFileSystemWatcher* m_watcher;
QString m_directory;
};