Skip to content

Commit

Permalink
COMP: Fix -Wdeprecated-declarations in ctkDICOMThumbnailGenerator
Browse files Browse the repository at this point in the history
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 <james.butler@perkinelmer.com>
Co-authored-by: Andras Lasso <lasso@queensu.ca>
  • Loading branch information
3 people committed Jun 26, 2023
1 parent 01963f4 commit 5d241ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libs/DICOM/Widgets/ctkDICOMThumbnailGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 5d241ec

Please sign in to comment.