Commit dc64af6f authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Remove code for old qt version

parent 2af26baf
......@@ -26,11 +26,7 @@ QtFrameBuffer::QtFrameBuffer(WId id, QObject *parent)
if (screen) {
primaryScreen = screen;
fbImage = screen->grabWindow(win).toImage();
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
fb = new char[fbImage.sizeInBytes()];
#else
fb = new char[fbImage.byteCount()];
#endif
} else {
fb = nullptr;
primaryScreen = nullptr;
......@@ -108,11 +104,7 @@ void QtFrameBuffer::updateFrameBuffer()
tiles.append(img.rect());
#endif
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
memcpy(fb, img.bits(), static_cast<size_t>(img.sizeInBytes()));
#else
memcpy(fb, img.bits(), img.byteCount());
#endif
fbImage = img;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment