mirror of
https://invent.kde.org/network/krfb
synced 2024-07-01 07:24:29 +00:00
Remove code for old qt version
This commit is contained in:
parent
2af26baf56
commit
dc64af6f5e
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user