Make sure jobs don't outlive ClientSideEncryption

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
This commit is contained in:
Kevin Ottens 2020-10-20 16:51:38 +02:00
parent 399b97442e
commit b5fdbefb0e
No known key found for this signature in database
GPG key ID: 074BBBCB8DECC9E2

View file

@ -1243,7 +1243,7 @@ void ClientSideEncryption::getPublicKeyFromServer()
void ClientSideEncryption::scheduleFolderEncryptedStatusJob(const QString &path)
{
auto getEncryptedStatus = new GetFolderEncryptStatusJob(_account, path);
auto getEncryptedStatus = new GetFolderEncryptStatusJob(_account, path, this);
connect(getEncryptedStatus, &GetFolderEncryptStatusJob::encryptStatusReceived,
this, &ClientSideEncryption::folderEncryptedStatusFetched);
connect(getEncryptedStatus, &GetFolderEncryptStatusJob::encryptStatusError,