From 96fdaebb5c8c8902c98c1fb43e755cf90fc15198 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 18 Aug 2015 02:25:24 +0200 Subject: GH-926 implement log cleaning functionality Also adds gzip compressed log support --- logic/RecursiveFileSystemWatcher.h | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'logic/RecursiveFileSystemWatcher.h') diff --git a/logic/RecursiveFileSystemWatcher.h b/logic/RecursiveFileSystemWatcher.h index 339172bb..a2a9e7e3 100644 --- a/logic/RecursiveFileSystemWatcher.h +++ b/logic/RecursiveFileSystemWatcher.h @@ -2,6 +2,7 @@ #include #include +#include "pathmatcher/IPathMatcher.h" class RecursiveFileSystemWatcher : public QObject { @@ -10,16 +11,27 @@ public: RecursiveFileSystemWatcher(QObject *parent); void setRootDir(const QDir &root); - QDir rootDir() const { return m_root; } + QDir rootDir() const + { + return m_root; + } // WARNING: setting this to true may be bad for performance void setWatchFiles(const bool watchFiles); - bool watchFiles() const { return m_watchFiles; } + bool watchFiles() const + { + return m_watchFiles; + } - void setFileExpression(const QString &exp) { m_exp = exp; } - QString fileExpression() const { return m_exp; } + void setMatcher(IPathMatcher::Ptr matcher) + { + m_matcher = matcher; + } - QStringList files() const { return m_files; } + QStringList files() const + { + return m_files; + } signals: void filesChanged(); @@ -33,7 +45,7 @@ private: QDir m_root; bool m_watchFiles = false; bool m_isEnabled = false; - QString m_exp; + IPathMatcher::Ptr m_matcher; QFileSystemWatcher *m_watcher; -- cgit v1.2.3