From a5b4922a0e7b60cdcb2ea4a380c1be9f75285464 Mon Sep 17 00:00:00 2001 From: Kevin Ottens Date: Thu, 13 Aug 2020 14:23:18 +0200 Subject: [PATCH] Remove unused method Signed-off-by: Kevin Ottens --- src/gui/folderstatusmodel.cpp | 18 ------------------ src/gui/folderstatusmodel.h | 1 - 2 files changed, 19 deletions(-) diff --git a/src/gui/folderstatusmodel.cpp b/src/gui/folderstatusmodel.cpp index e92c63cd4..f146fffc7 100644 --- a/src/gui/folderstatusmodel.cpp +++ b/src/gui/folderstatusmodel.cpp @@ -409,24 +409,6 @@ FolderStatusModel::SubFolderInfo *FolderStatusModel::infoForIndex(const QModelIn } } -/* Recursivelly traverse the file info looking for the id */ -FolderStatusModel::SubFolderInfo *FolderStatusModel::infoForFileId(const QByteArray& fileId, SubFolderInfo* info) const -{ - const QVector& infoVec = info ? info->_subs : _folders; - for(int i = 0, end = infoVec.size(); i < end; i++) { - auto *info = const_cast(&infoVec[i]); - if (info->_fileId == fileId) { - return info; - } else if (info->_subs.size()) { - if (auto *subInfo = infoForFileId(fileId, info)) { - return subInfo; - } - } - } - - return nullptr; -} - QModelIndex FolderStatusModel::indexForPath(Folder *f, const QString &path) const { if (!f) { diff --git a/src/gui/folderstatusmodel.h b/src/gui/folderstatusmodel.h index 8c9a56478..63c8d4333 100644 --- a/src/gui/folderstatusmodel.h +++ b/src/gui/folderstatusmodel.h @@ -105,7 +105,6 @@ public: FetchLabel }; ItemType classify(const QModelIndex &index) const; SubFolderInfo *infoForIndex(const QModelIndex &index) const; - SubFolderInfo *infoForFileId(const QByteArray &fileId, SubFolderInfo *info = nullptr) const; // If the selective sync check boxes were changed bool isDirty() { return _dirty; }