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 Hannah von Reth
parent 44ee228589
commit ed71bb7cb9

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;
}));
}