void ClientSideEncryption::fetchFolderEncryptedStatus()
{
_refreshingEncryptionStatus = true;
+ _folder2encryptedStatus.clear();
+
auto getEncryptedStatus = new GetFolderEncryptStatusJob(_account, QString());
connect(getEncryptedStatus, &GetFolderEncryptStatusJob::encryptStatusReceived,
this, &ClientSideEncryption::folderEncryptedStatusFetched);
_folderStatusJobs.removeAll(job);
+ // FIXME: Can be replaced by _folder2encryptedStatus.insert(result); once we depend on Qt 5.15
+ for (auto it = result.constKeyValueBegin(); it != result.constKeyValueEnd(); ++it) {
+ _folder2encryptedStatus.insert((*it).first, (*it).second);
+ }
+
_refreshingEncryptionStatus = false;
- _folder2encryptedStatus = result;
qCDebug(lcCse) << "Retrieved correctly the encrypted status of the folders." << result;
- emit folderEncryptedStatusFetchDone(result);
+ emit folderEncryptedStatusFetchDone(_folder2encryptedStatus);
}
void ClientSideEncryption::folderEncryptedStatusError(int error)
_refreshingEncryptionStatus = false;
qCDebug(lcCse) << "Failed to retrieve the status of the folders." << error;
- emit folderEncryptedStatusFetchDone({});
+ emit folderEncryptedStatusFetchDone(_folder2encryptedStatus);
}
FolderMetadata::FolderMetadata(AccountPtr account, const QByteArray& metadata, int statusCode) : _account(account)