diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-03-29 23:32:48 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2010-03-29 23:34:06 (GMT) |
commit | cee97322cab0c14e1e3cce7773ba82c6aca86bb3 (patch) | |
tree | 407349a050eb036bee8628d5d460505871334085 /src | |
parent | 9f38b5824b0300c615231729f1e7cdb17890083a (diff) | |
download | Qt-cee97322cab0c14e1e3cce7773ba82c6aca86bb3.zip Qt-cee97322cab0c14e1e3cce7773ba82c6aca86bb3.tar.gz Qt-cee97322cab0c14e1e3cce7773ba82c6aca86bb3.tar.bz2 |
Make sure cursor delegate is parented.
setParentItem no longer sets QObject parent.
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetextedit.cpp | 2 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetextinput.cpp | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index 7dacfbb..03b2425 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -43,6 +43,7 @@ #include "qdeclarativetextedit_p_p.h" #include "qdeclarativeevents_p_p.h" +#include <private/qdeclarativeglobal_p.h> #include <QTextLayout> #include <QTextLine> @@ -485,6 +486,7 @@ void QDeclarativeTextEdit::loadCursorDelegate() this, SLOT(moveCursorDelegate())); d->control->setCursorWidth(0); dirtyCache(cursorRect()); + QDeclarative_setParent_noEvent(d->cursor, this); d->cursor->setParentItem(this); d->cursor->setHeight(QFontMetrics(d->font).height()); moveCursorDelegate(); diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index f57ffc1..88801a4 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -42,6 +42,7 @@ #include "qdeclarativetextinput_p.h" #include "qdeclarativetextinput_p_p.h" +#include <private/qdeclarativeglobal_p.h> #include <qdeclarativeinfo.h> #include <QValidator> @@ -619,6 +620,7 @@ void QDeclarativeTextInput::createCursor() return; } + QDeclarative_setParent_noEvent(d->cursorItem, this); d->cursorItem->setParentItem(this); d->cursorItem->setX(d->control->cursorToX()); d->cursorItem->setHeight(d->control->height()); |