vfs: Disable selective sync if vfs support is available

This commit is contained in:
Christian Kamm 2019-01-08 09:14:38 +01:00 committed by Kevin Ottens
parent aa23058d76
commit cbb32edee2
No known key found for this signature in database
GPG key ID: 074BBBCB8DECC9E2
2 changed files with 4 additions and 4 deletions

View file

@ -418,7 +418,7 @@ void AccountSettings::slotCustomContextMenuRequested(const QPoint &pos)
ac = menu->addAction(tr("Edit Ignored Files"));
connect(ac, &QAction::triggered, this, &AccountSettings::slotEditCurrentIgnoredFiles);
if (!_ui->_folderList->isExpanded(index) && !folder->newFilesAreVirtual()) {
if (!_ui->_folderList->isExpanded(index) && !folder->supportsVirtualFiles()) {
ac = menu->addAction(tr("Choose what to sync"));
ac->setEnabled(folderConnected);
connect(ac, &QAction::triggered, this, &AccountSettings::doExpand);

View file

@ -370,7 +370,7 @@ int FolderStatusModel::rowCount(const QModelIndex &parent) const
auto info = infoForIndex(parent);
if (!info)
return 0;
if (info->_folder && info->_folder->newFilesAreVirtual())
if (info->_folder && info->_folder->supportsVirtualFiles())
return 0;
if (info->hasLabel())
return 1;
@ -527,7 +527,7 @@ bool FolderStatusModel::hasChildren(const QModelIndex &parent) const
if (!info)
return false;
if (info->_folder && info->_folder->newFilesAreVirtual())
if (info->_folder && info->_folder->supportsVirtualFiles())
return false;
if (!info->_fetched)
@ -555,7 +555,7 @@ bool FolderStatusModel::canFetchMore(const QModelIndex &parent) const
// Keep showing the error to the user, it will be hidden when the account reconnects
return false;
}
if (info->_folder && info->_folder->newFilesAreVirtual()) {
if (info->_folder && info->_folder->supportsVirtualFiles()) {
// Selective sync is hidden in that case
return false;
}