diff options
-rw-r--r-- | dist/changes-5.1.1 | 25 | ||||
-rw-r--r-- | tools/pngdumper/pngdumper.cpp | 8 |
2 files changed, 30 insertions, 3 deletions
diff --git a/dist/changes-5.1.1 b/dist/changes-5.1.1 new file mode 100644 index 0000000..e233af4 --- /dev/null +++ b/dist/changes-5.1.1 @@ -0,0 +1,25 @@ +Qt 5.1.1 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.1.0. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + + http://qt-project.org/doc/qt-5.1/ + +The Qt version 5.1 series is binary compatible with the 5.0.x series. +Applications compiled for 5.0 will continue to run with 5.1. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + + http://bugreports.qt-project.org/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + + +**************************************************************************** +* General * +**************************************************************************** + + - This release contains only minor code improvements. diff --git a/tools/pngdumper/pngdumper.cpp b/tools/pngdumper/pngdumper.cpp index 8c3d065..75d2780 100644 --- a/tools/pngdumper/pngdumper.cpp +++ b/tools/pngdumper/pngdumper.cpp @@ -42,6 +42,7 @@ #include "pngdumper.h" #include <QtQml/qqml.h> +#include <QtQuick/QQuickWindow> ItemCapturer::ItemCapturer(QQuickItem *parent): QQuickItem(parent) @@ -54,10 +55,11 @@ ItemCapturer::~ItemCapturer() void ItemCapturer::grabItem(QQuickItem *item, QString filename) { - QImage img = canvas()->grabFrameBuffer(); + QQuickWindow *w = window(); + QImage img = w->grabWindow(); while (img.width() * img.height() == 0) - img = canvas()->grabFrameBuffer(); - QQuickItem *rootItem = canvas()->rootItem(); + img = w->grabWindow(); + QQuickItem *rootItem = w->contentItem(); QRectF rectf = rootItem->mapRectFromItem(item, QRectF(0, 0, item->width(), item->height())); QDir pwd = QDir().dirName(); pwd.mkdir("output"); |