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 Olivier Goffart
parent 421c0b447e
commit bd93002759
2 changed files with 4 additions and 4 deletions

View File

@ -315,7 +315,7 @@ void AccountSettings::slotCustomContextMenuRequested(const QPoint &pos)
QAction *ac = menu->addAction(tr("Open folder"));
connect(ac, &QAction::triggered, this, &AccountSettings::slotOpenCurrentFolder);
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

@ -362,7 +362,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;
@ -519,7 +519,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)
@ -547,7 +547,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;
}