QDecompressHelper: translate two error messages
Like the other similar messages that exist in the file. Change-Id: I83fbf22ffc8dddeb0eb54d2c867fb1a70cbfe6a7 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
parent
6212c32f1f
commit
763c47e055
@ -720,9 +720,9 @@ qsizetype QDecompressHelper::readBrotli(char *data, const qsizetype maxSize)
|
||||
switch (result) {
|
||||
Q_UNLIKELY_BRANCH
|
||||
case BROTLI_DECODER_RESULT_ERROR:
|
||||
errorStr = QLatin1String("Brotli error: %1")
|
||||
.arg(QString::fromUtf8(BrotliDecoderErrorString(
|
||||
BrotliDecoderGetErrorCode(brotliDecoderState))));
|
||||
errorStr = QCoreApplication::translate("QHttp", "Brotli error: %1")
|
||||
.arg(QUtf8StringView{BrotliDecoderErrorString(
|
||||
BrotliDecoderGetErrorCode(brotliDecoderState))});
|
||||
return -1;
|
||||
case BROTLI_DECODER_RESULT_SUCCESS:
|
||||
BrotliDecoderDestroyInstance(brotliDecoderState);
|
||||
@ -768,8 +768,8 @@ qsizetype QDecompressHelper::readZstandard(char *data, const qsizetype maxSize)
|
||||
while (outBuf.pos < outBuf.size && (inBuf.pos < inBuf.size || decoderHasData)) {
|
||||
size_t retValue = ZSTD_decompressStream(zstdStream, &outBuf, &inBuf);
|
||||
if (ZSTD_isError(retValue)) Q_UNLIKELY_BRANCH {
|
||||
errorStr = QLatin1String("ZStandard error: %1")
|
||||
.arg(QString::fromUtf8(ZSTD_getErrorName(retValue)));
|
||||
errorStr = QCoreApplication::translate("QHttp", "ZStandard error: %1")
|
||||
.arg(QUtf8StringView{ZSTD_getErrorName(retValue)});
|
||||
return -1;
|
||||
}
|
||||
decoderHasData = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user