From 5d241ecc539dcee182a78b03ecf78514a7fba58c Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Wed, 14 Jun 2023 00:48:02 -0400 Subject: [PATCH] COMP: Fix -Wdeprecated-declarations in ctkDICOMThumbnailGenerator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit fixes the following warning: /path/to/CTK/Libs/DICOM/Widgets/ctkDICOMThumbnailGenerator.cpp:174:23: warning: ‘QByteArray& QByteArray::append(const QString&)’ is deprecated: Use QString's toUtf8(), toLatin1() or toLocal8Bit() [-Wdeprecated-declarations] 174 | buffer.append(header); | ^ Co-authored-by: James Butler Co-authored-by: Andras Lasso --- Libs/DICOM/Widgets/ctkDICOMThumbnailGenerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libs/DICOM/Widgets/ctkDICOMThumbnailGenerator.cpp b/Libs/DICOM/Widgets/ctkDICOMThumbnailGenerator.cpp index 3439f3d1b0..a99ee51705 100644 --- a/Libs/DICOM/Widgets/ctkDICOMThumbnailGenerator.cpp +++ b/Libs/DICOM/Widgets/ctkDICOMThumbnailGenerator.cpp @@ -171,7 +171,7 @@ bool ctkDICOMThumbnailGenerator::generateThumbnail(DicomImage *dcmImage, QImage& /* create output buffer for DicomImage class */ QByteArray buffer; /* copy header to output buffer and resize it for pixel data */ - buffer.append(header); + buffer.append(header.toUtf8()); buffer.resize(length); /* render pixel data to buffer */