diff options
author | Trial97 <alexandru.tripon97@gmail.com> | 2023-07-02 15:56:39 +0300 |
---|---|---|
committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-07-02 15:56:39 +0300 |
commit | cf2393a50966f8dc84720f7d44538b0cb7649d46 (patch) | |
tree | 7da9300bb8cb9d8aa0f71b7b44d77425ebb6a05e /launcher/FileIgnoreProxy.h | |
parent | 0f64ee6a5f6d157e493d474b74004a4ebd0dae43 (diff) | |
parent | b51f1f1d41a6153c37b1d61a04df8ece5004cc27 (diff) | |
download | PrismLauncher-cf2393a50966f8dc84720f7d44538b0cb7649d46.tar.gz PrismLauncher-cf2393a50966f8dc84720f7d44538b0cb7649d46.tar.bz2 PrismLauncher-cf2393a50966f8dc84720f7d44538b0cb7649d46.zip |
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into settings
Diffstat (limited to 'launcher/FileIgnoreProxy.h')
-rw-r--r-- | launcher/FileIgnoreProxy.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/launcher/FileIgnoreProxy.h b/launcher/FileIgnoreProxy.h index a5a1153d..e01a2651 100644 --- a/launcher/FileIgnoreProxy.h +++ b/launcher/FileIgnoreProxy.h @@ -36,6 +36,7 @@ #pragma once +#include <QFileInfo> #include <QSortFilterProxyModel> #include "SeparatorPrefixTree.h" @@ -63,10 +64,22 @@ class FileIgnoreProxy : public QSortFilterProxyModel { inline const SeparatorPrefixTree<'/'>& blockedPaths() const { return blocked; } inline SeparatorPrefixTree<'/'>& blockedPaths() { return blocked; } + // 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 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; + SeparatorPrefixTree<'/'> m_ignoreFilePaths; }; |