Android: Rename image method to toImage.

toImage is a virtual method declared in QPlatformBackingStore and is
useful when you need to access the image buffer from outside the QPA
plugin. (e.g. you can use
QPlatformBackingStore::toImage().save("bs.png") to save it).

Change-Id: I7cc70ed295070707ed0ef3ce208129f174f68cfb
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
bb10
BogDan Vatra 2014-06-04 10:51:31 +03:00 committed by The Qt Project
parent 74d46a669b
commit f4ecc48112
2 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ public:
virtual QPaintDevice *paintDevice();
virtual void flush(QWindow *window, const QRegion &region, const QPoint &offset);
virtual void resize(const QSize &size, const QRegion &staticContents);
const QImage image() { return m_image; }
QImage toImage() const { return m_image; }
void setBackingStore(QWindow *window);
protected:
QImage m_image;

View File

@ -308,7 +308,7 @@ void QAndroidPlatformScreen::doRedraw()
QRect windowRect = targetRect.translated(-window->geometry().topLeft());
QAndroidPlatformBackingStore *backingStore = static_cast<QAndroidPlatformRasterWindow *>(window)->backingStore();
if (backingStore)
compositePainter.drawImage(targetRect.topLeft(), backingStore->image(), windowRect);
compositePainter.drawImage(targetRect.topLeft(), backingStore->toImage(), windowRect);
}
}