From f49643075ac4a0bac1f4d1983398b8f19297b2f4 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Mon, 20 Jan 2020 19:27:47 -0500 Subject: moved a bunch of duplicate stuff in a new class Range --- src/filetreemodel.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/filetreemodel.h') 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::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& seen); - void removeRange(FileTreeItem& parentItem, int first, int last); - - void addRange( - FileTreeItem& parentItem, int at, - std::vector>& items); - void updateFiles( FileTreeItem& parentItem, const std::wstring& path, @@ -108,6 +105,7 @@ private: const std::wstring& parentPath, int firstFileRow, const std::unordered_set& seen); + std::wstring makeModName(const MOShared::FileEntry& file, int originID) const; void ensureLoaded(FileTreeItem* item) const; -- cgit v1.3.1