diff options
author | Christian Kamm <mail@ckamm.de> | 2018-11-26 13:33:29 +0300 |
---|---|---|
committer | Christian Kamm <mail@ckamm.de> | 2018-11-26 15:02:48 +0300 |
commit | 18ab3f5dcd37bba296c2b650826b8e3454fc66b3 (patch) | |
tree | 286c5eb99731328d25473a3548b5d236f28ae488 /src/gui/folderstatusmodel.cpp | |
parent | 3ba01233535623e7638bb1fff0c478e483cca8cd (diff) |
vfs: Separate vfs availability from new-files-virtual
This helps support 2.5 settings where there are virtual files in the
tree but new files aren't created virtual.
It's also a prelude for #6815
There's currently no way of
- upgrading vfs plugins (a silent suffix->winvfs upgrade is attempted
once only, when moving to master)
- disabling vfs capabilities outright
Diffstat (limited to 'src/gui/folderstatusmodel.cpp')
-rw-r--r-- | src/gui/folderstatusmodel.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/folderstatusmodel.cpp b/src/gui/folderstatusmodel.cpp index e7771cf08..363c7899d 100644 --- a/src/gui/folderstatusmodel.cpp +++ b/src/gui/folderstatusmodel.cpp @@ -211,7 +211,7 @@ QVariant FolderStatusModel::data(const QModelIndex &index, int role) const case FolderStatusDelegate::FolderErrorMsg: return f->syncResult().errorStrings(); case FolderStatusDelegate::FolderInfoMsg: - return f->useVirtualFiles() + return f->newFilesAreVirtual() ? QStringList(tr("New files are being created as virtual files.")) : QStringList(); case FolderStatusDelegate::SyncRunning: @@ -362,7 +362,7 @@ int FolderStatusModel::rowCount(const QModelIndex &parent) const auto info = infoForIndex(parent); if (!info) return 0; - if (info->_folder && info->_folder->useVirtualFiles()) + if (info->_folder && info->_folder->newFilesAreVirtual()) 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->useVirtualFiles()) + if (info->_folder && info->_folder->newFilesAreVirtual()) 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->useVirtualFiles()) { + if (info->_folder && info->_folder->newFilesAreVirtual()) { // Selective sync is hidden in that case return false; } |