Made sure the logs are ignored when collecting files

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2023-06-30 10:52:10 +03:00
parent 87efa700ab
commit 81207c6502
4 changed files with 26 additions and 11 deletions

View File

@ -36,6 +36,7 @@
#pragma once
#include <QFileInfo>
#include <QSortFilterProxyModel>
#include "SeparatorPrefixTree.h"
@ -66,15 +67,19 @@ class FileIgnoreProxy : public QSortFilterProxyModel {
// list of file names that need to be removed completely from model
inline QStringList& ignoreFilesWithName() { return m_ignoreFiles; }
// list of relative paths that need to be removed completely from model
inline QStringList& ignoreFilesWithPath() { return m_ignoreFilePaths; }
inline SeparatorPrefixTree<'/'>& ignoreFilesWithPath() { return m_ignoreFilePaths; }
bool filterFile(const QString& fileName) const;
protected:
bool filterAcceptsColumn(int source_column, const QModelIndex& source_parent) const;
bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const;
bool ignoreFile(QFileInfo file) const;
private:
const QString root;
SeparatorPrefixTree<'/'> blocked;
QStringList m_ignoreFiles;
QStringList m_ignoreFilePaths;
SeparatorPrefixTree<'/'> m_ignoreFilePaths;
};