Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2022-04-13 13:19:25 +0300
committerHannah von Reth <vonreth@kde.org>2022-04-13 17:57:48 +0300
commit277ebe0296b0b0edea45cc0029d2f93a3e5e9bb6 (patch)
treee4f1aabac011ed503238583b67ade0cac51726ff /src/gui/folder.h
parent8e9727721fbeafb9455e10801d8f586ac70ed9ef (diff)
Add display name to folders
Diffstat (limited to 'src/gui/folder.h')
-rw-r--r--src/gui/folder.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/gui/folder.h b/src/gui/folder.h
index bcf484092..bc5542ae5 100644
--- a/src/gui/folder.h
+++ b/src/gui/folder.h
@@ -51,9 +51,9 @@ class LocalDiscoveryTracker;
class FolderDefinition
{
public:
- static auto createNewFolderDefinition(const QUrl &davUrl)
+ static auto createNewFolderDefinition(const QUrl &davUrl, const QString &displayName = {})
{
- return FolderDefinition(QUuid::createUuid().toByteArray(QUuid::WithoutBraces), davUrl);
+ return FolderDefinition(QUuid::createUuid().toByteArray(QUuid::WithoutBraces), davUrl, displayName);
}
/// path to the journal, usually relative to localPath
@@ -112,23 +112,20 @@ public:
const QByteArray &id() const;
+ QString displayName() const;
private:
- FolderDefinition(const QByteArray &id, const QUrl &davUrl);
+ FolderDefinition(const QByteArray &id, const QUrl &davUrl, const QString &displayName);
+ QUrl _webDavUrl;
+ /// For legacy reasons this can be a string, new folder objects will use a uuid
+ QByteArray _id;
+ QString _displayName;
/// path on local machine (always trailing /)
QString _localPath;
/// path on remote (usually no trailing /, exception "/")
QString _targetPath;
- QUrl _webDavUrl;
-
- /// For legacy reasons this can be a string, new folder objects will use a uuid
- QByteArray _id;
-
- /// legacy: override the id if we encounter a clash in FolderMan
- void setId(const QByteArray &id);
-
friend class FolderMan;
};
@@ -158,7 +155,8 @@ public:
AccountStatePtr accountState() const { return _accountState; }
QByteArray id() const;
- QString shortGuiRemotePathOrAppName() const;
+
+ QString displayName() const;
/**
* short local path to display on the GUI (native separators)