diff options
author | Hannah von Reth <hannah.vonreth@owncloud.com> | 2022-04-13 13:19:25 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2022-04-13 17:57:48 +0300 |
commit | 277ebe0296b0b0edea45cc0029d2f93a3e5e9bb6 (patch) | |
tree | e4f1aabac011ed503238583b67ade0cac51726ff /src/gui/folderstatusmodel.cpp | |
parent | 8e9727721fbeafb9455e10801d8f586ac70ed9ef (diff) |
Add display name to folders
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 788e07bd0..ff2062eb1 100644 --- a/src/gui/folderstatusmodel.cpp +++ b/src/gui/folderstatusmodel.cpp @@ -56,8 +56,8 @@ FolderStatusModel::~FolderStatusModel() static bool sortByFolderHeader(const FolderStatusModel::SubFolderInfo &lhs, const FolderStatusModel::SubFolderInfo &rhs) { - return QString::compare(lhs._folder->shortGuiRemotePathOrAppName(), - rhs._folder->shortGuiRemotePathOrAppName(), + return QString::compare(lhs._folder->displayName(), + rhs._folder->displayName(), Qt::CaseInsensitive) < 0; } @@ -144,7 +144,7 @@ QVariant FolderStatusModel::data(const QModelIndex &index, int role) const // independent of the index if (role == FolderStatusDelegate::IsUsingSpaces) { - return _accountState->account()->capabilities().spacesSupport().enabled; + return _accountState->account()->hasCapabilities() && _accountState->account()->capabilities().spacesSupport().enabled; } switch (classify(index)) { case AddButton: { @@ -236,7 +236,7 @@ QVariant FolderStatusModel::data(const QModelIndex &index, int role) const case FolderStatusDelegate::SyncRunning: return f->syncResult().status() == SyncResult::SyncRunning; case FolderStatusDelegate::HeaderRole: - return f->shortGuiRemotePathOrAppName(); + return f->displayName(); case FolderStatusDelegate::FolderSyncPaused: return f->syncPaused(); case FolderStatusDelegate::FolderAccountConnected: |