aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktext.cpp
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2012-02-03 11:48:24 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-06 02:11:27 +0100
commitb2c709eb2dddfa9cb84cf36722a23663c3e3dd22 (patch)
tree60dc68cad6fc48e5a55867dd85feebcb81521bc8 /src/quick/items/qquicktext.cpp
parenteb9d6aeb5affd5afb87ccedd9b99d2aeaff6e577 (diff)
Cleanup: remove some debugging and use QQuickTextNode::addImage
Change-Id: I20f38f590b158d5d615923c30e85e2a7cfd99763 Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/quick/items/qquicktext.cpp')
-rw-r--r--src/quick/items/qquicktext.cpp19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp
index e7673478bd..00a40ab54d 100644
--- a/src/quick/items/qquicktext.cpp
+++ b/src/quick/items/qquicktext.cpp
@@ -63,8 +63,6 @@
#include <qmath.h>
#include <limits.h>
-DEFINE_BOOL_CONFIG_OPTION(qmlTextDebug, QML_TEXT_DEBUG)
-
QT_BEGIN_NAMESPACE
extern Q_GUI_EXPORT bool qt_applefontsmoothing_enabled;
@@ -2055,22 +2053,9 @@ QSGNode *QQuickText::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data
}
foreach (QDeclarativeStyledTextImgTag *img, d->visibleImgTags) {
- if (qmlTextDebug()) {
- QSGRectangleNode *rectangle = d->sceneGraphContext()->createRectangleNode();
- rectangle->setRect(QRectF(img->pos.x(), img->pos.y() + bounds.y(),img->size.width(), img->size.height()));
- rectangle->setColor(QColor("red"));
- rectangle->update();
- node->appendChildNode(rectangle);
- }
QDeclarativePixmap *pix = img->pix;
- if (pix && pix->isReady()) {
- QSGTexture *texture = d->sceneGraphContext()->textureForFactory(pix->textureFactory());
- QSGImageNode *imgnode = d->sceneGraphContext()->createImageNode();
- imgnode->setTexture(texture);
- imgnode->setTargetRect(QRectF(img->pos.x(), img->pos.y() + bounds.y(), pix->width(), pix->height()));
- node->appendChildNode(imgnode);
- imgnode->update();
- }
+ if (pix && pix->isReady())
+ node->addImage(QRectF(img->pos.x(), img->pos.y() + bounds.y(), pix->width(), pix->height()), pix->image());
}
return node;
}