Force cast to int to avoid warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data

This commit is contained in:
Rob Emery 2024-10-09 22:08:17 +01:00
parent 0e9a4157f2
commit 65ee0e616c

View file

@ -112,7 +112,7 @@ void WindowsNotificationsListener::onNotificationChanged(const UserNotificationL
reader.ReadBytes({bufferArray.data(), bufferArray.data() + bufferArray.size()});
QImage image;
if (image.loadFromData(bufferArray.data(), bufferArray.size())) {
if (image.loadFromData(bufferArray.data(), (int)(bufferArray.size()))) {
// Write the logo buffer to the QIODevice
QSharedPointer<QIODevice> iconSource = iconFromQImage(image);
if (iconSource) {