Fixed build for Qt <5.10, MSVC

This commit is contained in:
Matthias Koefferlein 2022-05-24 07:48:20 +02:00
parent c933d1a2b5
commit d6f320bc8b
2 changed files with 2 additions and 1 deletions

View File

@ -26,6 +26,7 @@
#include "tlMath.h"
#include <ctype.h>
#include <algorithm>
namespace lay
{

View File

@ -290,7 +290,7 @@ QImage
PixelBuffer::to_image_copy () const
{
QImage img (m_width, m_height, m_transparent ? QImage::Format_ARGB32 : QImage::Format_RGB32);
#if QT_VERSION < 0x050000
#if QT_VERSION < 0x051000
memcpy (img.bits (), data (), img.byteCount ());
#else
memcpy (img.bits (), data (), img.sizeInBytes ());