diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2020-01-20 19:27:47 -0500 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2020-02-04 03:33:20 -0500 |
| commit | f49643075ac4a0bac1f4d1983398b8f19297b2f4 (patch) | |
| tree | 44eef2967025d989288c076a4071dee5e6ed5280 /src/filetreemodel.h | |
| parent | 7c4d3c6fb958d61e8d74fac982907f48831c7f7e (diff) | |
moved a bunch of duplicate stuff in a new class Range
Diffstat (limited to 'src/filetreemodel.h')
| -rw-r--r-- | src/filetreemodel.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/filetreemodel.h b/src/filetreemodel.h index 70291b61..ac82a66a 100644 --- a/src/filetreemodel.h +++ b/src/filetreemodel.h @@ -52,6 +52,8 @@ private: PruneDirectories = 0x01 }; + class Range; + Q_DECLARE_FLAGS(FillFlags, FillFlag); using DirectoryIterator = std::vector<MOShared::DirectoryEntry*>::const_iterator; @@ -75,6 +77,7 @@ private: FileTreeItem& parentItem, const MOShared::DirectoryEntry& parentEntry, const std::wstring& parentPath); + void updateDirectories( FileTreeItem& parentItem, const std::wstring& path, const MOShared::DirectoryEntry& parentEntry, FillFlags flags); @@ -88,12 +91,6 @@ private: const std::wstring& parentPath, const std::unordered_set<std::wstring_view>& seen); - void removeRange(FileTreeItem& parentItem, int first, int last); - - void addRange( - FileTreeItem& parentItem, int at, - std::vector<std::unique_ptr<FileTreeItem>>& items); - void updateFiles( FileTreeItem& parentItem, const std::wstring& path, @@ -108,6 +105,7 @@ private: const std::wstring& parentPath, int firstFileRow, const std::unordered_set<MOShared::FileEntry::Index>& seen); + std::wstring makeModName(const MOShared::FileEntry& file, int originID) const; void ensureLoaded(FileTreeItem* item) const; |
