From d92e984cb7a7046fcf152ed7a0c0fbb062d87643 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 10 Oct 2016 10:04:08 +0200 Subject: fb platforms: migrate to fbconvenience changes Task-number: QTBUG-56306 Change-Id: Ia0f48e139ba2c1f8f2167afa145d808093cd3e83 Reviewed-by: Andy Nichols --- src/plugins/platforms/vnc/qvncscreen.cpp | 8 ++++---- src/plugins/platforms/vnc/qvncscreen.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/plugins/platforms/vnc') diff --git a/src/plugins/platforms/vnc/qvncscreen.cpp b/src/plugins/platforms/vnc/qvncscreen.cpp index ed24abd31c..91a8933dba 100644 --- a/src/plugins/platforms/vnc/qvncscreen.cpp +++ b/src/plugins/platforms/vnc/qvncscreen.cpp @@ -150,10 +150,10 @@ QPixmap QVncScreen::grabWindow(WId wid, int x, int y, int width, int height) con { if (!wid) { if (width < 0) - width = mScreenImage->width() - x; + width = mScreenImage.width() - x; if (height < 0) - height = mScreenImage->height() - y; - return QPixmap::fromImage(*mScreenImage).copy(x, y, width, height); + height = mScreenImage.height() - y; + return QPixmap::fromImage(mScreenImage).copy(x, y, width, height); } QFbWindow *window = windowForId(wid); @@ -165,7 +165,7 @@ QPixmap QVncScreen::grabWindow(WId wid, int x, int y, int width, int height) con height = geom.height() - y; QRect rect(geom.topLeft() + QPoint(x, y), QSize(width, height)); rect &= window->geometry(); - return QPixmap::fromImage(*mScreenImage).copy(rect); + return QPixmap::fromImage(mScreenImage).copy(rect); } return QPixmap(); diff --git a/src/plugins/platforms/vnc/qvncscreen.h b/src/plugins/platforms/vnc/qvncscreen.h index 24dab6179c..4b7171b5a9 100644 --- a/src/plugins/platforms/vnc/qvncscreen.h +++ b/src/plugins/platforms/vnc/qvncscreen.h @@ -64,7 +64,7 @@ public: QPixmap grabWindow(WId wid, int x, int y, int width, int height) const Q_DECL_OVERRIDE; QRegion doRedraw() Q_DECL_OVERRIDE; - QImage *image() const { return mScreenImage; } + QImage *image() { return &mScreenImage; } void enableClientCursor(QVncClient *client); void disableClientCursor(QVncClient *client); -- cgit v1.2.3