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/folderman.cpp
parent8e9727721fbeafb9455e10801d8f586ac70ed9ef (diff)
Add display name to folders
Diffstat (limited to 'src/gui/folderman.cpp')
-rw-r--r--src/gui/folderman.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/folderman.cpp b/src/gui/folderman.cpp
index 4a42c334c..3ea1d0910 100644
--- a/src/gui/folderman.cpp
+++ b/src/gui/folderman.cpp
@@ -959,7 +959,7 @@ Folder *FolderMan::addFolderInternal(
{
// ensure we don't add multiple legacy folders with the same id
if (!OC_ENSURE(!folderDefinition.id().isEmpty() && !folder(folderDefinition.id()))) {
- folderDefinition.setId(QUuid::createUuid().toByteArray(QUuid::WithoutBraces));
+ folderDefinition._id = QUuid::createUuid().toByteArray(QUuid::WithoutBraces);
}
auto folder = new Folder(folderDefinition, accountState, std::move(vfs), this);
@@ -1411,13 +1411,13 @@ bool FolderMan::checkVfsAvailability(const QString &path, Vfs::Mode mode) const
return unsupportedConfiguration(path) && Vfs::checkAvailability(path, mode);
}
-void FolderMan::addFolderFromWizard(AccountStatePtr accountStatePtr, const QString &localFolder, const QString &remotePath, const QUrl &webDavUrl, Wizard::SyncMode syncMode)
+Folder *FolderMan::addFolderFromWizard(AccountStatePtr accountStatePtr, const QString &localFolder, const QString &remotePath, const QUrl &webDavUrl, const QString &displayName, Wizard::SyncMode syncMode)
{
// first things first: we need to create the directory to make the sync engine happy (it will refuse to sync otherwise)
QDir().mkdir(localFolder);
qCInfo(lcFolderMan) << "Adding folder definition for" << localFolder << remotePath;
- auto folderDefinition = FolderDefinition::createNewFolderDefinition(webDavUrl);
+ auto folderDefinition = FolderDefinition::createNewFolderDefinition(webDavUrl, displayName);
folderDefinition.setLocalPath(localFolder);
folderDefinition.setTargetPath(remotePath);
folderDefinition.ignoreHiddenFiles = ignoreHiddenFiles();
@@ -1449,7 +1449,6 @@ void FolderMan::addFolderFromWizard(AccountStatePtr accountStatePtr, const QStri
} else {
qCWarning(lcFolderMan) << "Failed to create local sync folder!";
}
-
return f;
};
@@ -1463,8 +1462,9 @@ void FolderMan::addFolderFromWizard(AccountStatePtr accountStatePtr, const QStri
dialog->setAttribute(Qt::WA_DeleteOnClose);
dialog->show();
} else {
- finalize(folderDefinition);
+ return finalize(folderDefinition);
}
+ return nullptr;
}
} // namespace OCC