mirror of
https://github.com/KDE/krfb
synced 2026-07-01 07:31:16 -07:00
Remove code for old qt version
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user