mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
Made sure the logs are ignored when collecting files
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
87efa700ab
commit
81207c6502
4 changed files with 26 additions and 11 deletions
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue