Improve folder encryption dialog info boxes

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2022-12-09 23:22:30 +01:00 committed by Claudio Cambra
parent 19d5919b39
commit 01334e40f9

View file

@ -546,13 +546,14 @@ void SocketApi::processEncryptRequest(const QString &localFile)
connect(job, &OCC::EncryptFolderJob::finished, this, [fileData, job](const int status) { connect(job, &OCC::EncryptFolderJob::finished, this, [fileData, job](const int status) {
if (status == OCC::EncryptFolderJob::Error) { if (status == OCC::EncryptFolderJob::Error) {
const int ret = QMessageBox::critical(nullptr, const int ret = QMessageBox::critical(nullptr,
tr("Failed to encrypt folder at \"%1\"").arg(fileData.folderRelativePath), tr("Failed to encrypt folder"),
tr("Server replied with error: %1").arg(job->errorString())); tr("Could not encrypt the following folder: \"%1\". \n\n"
"Server replied with error: %2").arg(fileData.folderRelativePath, job->errorString()));
Q_UNUSED(ret) Q_UNUSED(ret)
} else { } else {
const int ret = QMessageBox::information(nullptr, const int ret = QMessageBox::information(nullptr,
tr("Folder at \"%1\" encrypted successfully").arg(fileData.folderRelativePath), tr("Folder encrypted successfully").arg(fileData.folderRelativePath),
{}); tr("The following folder was encrypted successfully: \"%1\"").arg(fileData.folderRelativePath));
Q_UNUSED(ret) Q_UNUSED(ret)
} }
}); });