From 4c0843478d69f684c82841169bc6fff988af0804 Mon Sep 17 00:00:00 2001 From: favoritas37 Date: Sat, 16 May 2015 15:40:40 +0300 Subject: [PATCH] reverted changes of the merged commit https://sourceforge.net/p/qzxing/code/ci/812238d1f5f706bd4050ce2ee925c56169673f54/ --- source/imagehandler.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/source/imagehandler.cpp b/source/imagehandler.cpp index 4315a84..6b5976f 100644 --- a/source/imagehandler.cpp +++ b/source/imagehandler.cpp @@ -4,7 +4,6 @@ #include #include #include -#include ImageHandler::ImageHandler(QObject *parent) : QObject(parent) @@ -17,22 +16,7 @@ QImage ImageHandler::extractQImage(QObject *imageObj, { QGraphicsObject *item = qobject_cast(imageObj); - if (!item && (imageObj->metaObject()->className() == "QQuickImage")) { - QQuickImage *quickimage = static_cast(imageObj); - - if (!quickImage) { - qDebug() << "quickimage is NULL"; - return QImage(); - } - - QImage img(quickimage->image()); - if(offsetX == 0 && offsetY == 0 && width == 0 && height == 0) - return img; - else - { - return img.copy(offsetX, offsetY, width, height); - } - } else if (!item) { + if (!item ) { qDebug() << "Item is NULL"; return QImage(); }