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) {
|
switch (result) {
|
||||||
Q_UNLIKELY_BRANCH
|
Q_UNLIKELY_BRANCH
|
||||||
case BROTLI_DECODER_RESULT_ERROR:
|
case BROTLI_DECODER_RESULT_ERROR:
|
||||||
errorStr = QLatin1String("Brotli error: %1")
|
errorStr = QCoreApplication::translate("QHttp", "Brotli error: %1")
|
||||||
.arg(QString::fromUtf8(BrotliDecoderErrorString(
|
.arg(QUtf8StringView{BrotliDecoderErrorString(
|
||||||
BrotliDecoderGetErrorCode(brotliDecoderState))));
|
BrotliDecoderGetErrorCode(brotliDecoderState))});
|
||||||
return -1;
|
return -1;
|
||||||
case BROTLI_DECODER_RESULT_SUCCESS:
|
case BROTLI_DECODER_RESULT_SUCCESS:
|
||||||
BrotliDecoderDestroyInstance(brotliDecoderState);
|
BrotliDecoderDestroyInstance(brotliDecoderState);
|
||||||
@ -768,8 +768,8 @@ qsizetype QDecompressHelper::readZstandard(char *data, const qsizetype maxSize)
|
|||||||
while (outBuf.pos < outBuf.size && (inBuf.pos < inBuf.size || decoderHasData)) {
|
while (outBuf.pos < outBuf.size && (inBuf.pos < inBuf.size || decoderHasData)) {
|
||||||
size_t retValue = ZSTD_decompressStream(zstdStream, &outBuf, &inBuf);
|
size_t retValue = ZSTD_decompressStream(zstdStream, &outBuf, &inBuf);
|
||||||
if (ZSTD_isError(retValue)) Q_UNLIKELY_BRANCH {
|
if (ZSTD_isError(retValue)) Q_UNLIKELY_BRANCH {
|
||||||
errorStr = QLatin1String("ZStandard error: %1")
|
errorStr = QCoreApplication::translate("QHttp", "ZStandard error: %1")
|
||||||
.arg(QString::fromUtf8(ZSTD_getErrorName(retValue)));
|
.arg(QUtf8StringView{ZSTD_getErrorName(retValue)});
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
decoderHasData = false;
|
decoderHasData = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user