diff options
author | Munkyu Im <munkyu.im@samsung.com> | 2014-10-27 18:28:30 +0900 |
---|---|---|
committer | Munkyu Im <munkyu.im@samsung.com> | 2014-11-06 14:42:46 +0900 |
commit | 0372d4462968b87c02d53ddf61324857f058b575 (patch) | |
tree | 761552e89258231bececb07441a7ff272c3b46b5 | |
parent | 45ad0f859a5fb042d72b2f10d33c82d40a1ee525 (diff) | |
download | qemu-0372d4462968b87c02d53ddf61324857f058b575.tar.gz qemu-0372d4462968b87c02d53ddf61324857f058b575.tar.bz2 qemu-0372d4462968b87c02d53ddf61324857f058b575.zip |
screenshot: Show blank image
Just in case when fail to get rendered image from frame buffer.
Change-Id: Ia460941a51046da16a3f3927d27f4746ca5c1bd8
Signed-off-by: Munkyu Im <munkyu.im@samsung.com>
-rw-r--r-- | tizen/src/ui/mainwindow.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tizen/src/ui/mainwindow.cpp b/tizen/src/ui/mainwindow.cpp index da749c77f6..abbdba2f9e 100644 --- a/tizen/src/ui/mainwindow.cpp +++ b/tizen/src/ui/mainwindow.cpp @@ -351,20 +351,23 @@ void MainWindow::unsetCaptureRequestHandler(void *data) void MainWindow::processCaptured(bool captured, void *pixels, int width, int height) { - qDebug("window process captured: %d %p[%dx%d]", + qDebug("window process captured: %d pixel: %p [%dx%d]", captured, pixels, width, height); if (captured) { - QImage image = QImage((uchar *)pixels, width, height, - QImage::Format_RGB32); + QImage image = QImage((uchar *)pixels, width, height, QImage::Format_RGB32); QPixmap pixmap = QPixmap::fromImage(image); /* deep copy the data */ QMetaObject::invokeMethod(popupMenu, "slotShowScreenshot", - Qt::QueuedConnection, - Q_ARG(QPixmap, pixmap)); - + Qt::QueuedConnection, + Q_ARG(QPixmap, pixmap)); qDebug("Image saved: %p", pixels); + } else { + QPixmap pixmap(uiInfo->resolution.width(), uiInfo->resolution.height()); + QMetaObject::invokeMethod(popupMenu, "slotShowScreenshot", Qt::QueuedConnection, Q_ARG(QPixmap, pixmap)); + qDebug("Blank Image saved"); } + } void MainWindow::setTopMost(bool on) |