-
Bug
-
Resolution: Done
-
P1: Critical
-
5.1.0 Beta 1
-
None
-
672354676d8e968e2523d1aeb450213a46b8b27c
In the designer we reparent a item and the the the paintedNode of the item is set to null. QQuickTextEdit::updatePaintNode is not handling this case.
The following diff is a hot fix but I think the case could be handled better.
diff --git a/src/quick/items/qquicktextedit.cpp b/src/quick/items/qquicktextedit.cpp
index 327b086..101761a 100644
--- a/src/quick/items/qquicktextedit.cpp
+++ b/src/quick/items/qquicktextedit.cpp
@@ -1755,7 +1755,8 @@ QSGNode *QQuickTextEdit::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *
// FIXME: the text decorations could probably be handled separately (only updated for affected textFrames)
if (d->frameDecorationsNode) {
- rootNode->removeChildNode(d->frameDecorationsNode);
+ if (oldNode)
+ rootNode->removeChildNode(d->frameDecorationsNode);
delete d->frameDecorationsNode;
}
d->frameDecorationsNode = d->createTextNode();
@@ -1865,7 +1866,7 @@ QSGNode *QQuickTextEdit::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *
QColor color = (!d->cursorVisible || !d->control->cursorOn())
? QColor(0, 0, 0, 0)
: d->color;
- if (d->cursorNode)
+ if (d->cursorNode && oldNode)
rootNode->removeChildNode(d->cursorNode);
delete d->cursorNode;
d->cursorNode = new QSGSimpleRectNode(cursorRectangle(), color);
- is required for
-
QTBUG-32183 Issues to be fixed in 5.1.1 (next patch release)
-
- Closed
-