}
}
-/* Recursivelly traverse the file info looking for the id */
-FolderStatusModel::SubFolderInfo *FolderStatusModel::infoForFileId(const QByteArray& fileId, SubFolderInfo* info) const
-{
- const QVector<SubFolderInfo>& infoVec = info ? info->_subs : _folders;
- for(int i = 0, end = infoVec.size(); i < end; i++) {
- auto *info = const_cast<SubFolderInfo *>(&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) {
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; }