Skip to content

Commit

Permalink
QDecompressHelper: translate two error messages
Browse files Browse the repository at this point in the history
Like the other similar messages that exist in the file.

Change-Id: I83fbf22ffc8dddeb0eb54d2c867fb1a70cbfe6a7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
  • Loading branch information
Ahmad Samir committed Dec 3, 2024
1 parent 6212c32 commit 763c47e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/network/access/qdecompresshelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -768,9 +768,9 @@ 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)));
return -1;
errorStr = QCoreApplication::translate("QHttp", "ZStandard error: %1")
.arg(QUtf8StringView{ZSTD_getErrorName(retValue)});
return -1;
}
decoderHasData = false;
bytesDecoded = outBuf.pos;
Expand Down

0 comments on commit 763c47e

Please sign in to comment.