Checksums: Explicitly close file before reporting result

To ensure it's no longer open when the finished signal fires.
This commit is contained in:
Christian Kamm 2019-09-23 16:58:56 +02:00 committed by Kevin Ottens
parent e91e1ca78f
commit c9476a11f4
No known key found for this signature in database
GPG key ID: 074BBBCB8DECC9E2

View file

@ -261,7 +261,9 @@ void ComputeChecksum::startImpl(std::unique_ptr<QIODevice> device)
}
return QByteArray();
}
return ComputeChecksum::computeNow(sharedDevice.data(), type);
auto result = ComputeChecksum::computeNow(sharedDevice.data(), type);
sharedDevice->close();
return result;
}));
}