diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-06-15 05:49:08 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2010-06-15 05:49:08 (GMT) |
commit | c1e6d97b9476c859abc3927046144b4006fcf735 (patch) | |
tree | b7eb906c850ff2c06ffb96f74d0f8d2b0feb55ae /src/declarative/graphicsitems/qdeclarativetextedit.cpp | |
parent | b18a343cc63f93a8e97a8c6c623e56a666775b57 (diff) | |
download | Qt-c1e6d97b9476c859abc3927046144b4006fcf735.zip Qt-c1e6d97b9476c859abc3927046144b4006fcf735.tar.gz Qt-c1e6d97b9476c859abc3927046144b4006fcf735.tar.bz2 |
Remove duplicated code.
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativetextedit.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetextedit.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index 3b4f2a7..3106daf 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -1113,13 +1113,7 @@ void QDeclarativeTextEdit::mousePressEvent(QGraphicsSceneMouseEvent *event) Q_D(QDeclarativeTextEdit); if (d->focusOnPress){ bool hadFocus = hasFocus(); - QGraphicsItem *p = parentItem();//###Is there a better way to find my focus scope? - while(p) { - if (p->flags() & QGraphicsItem::ItemIsFocusScope) - p->setFocus(); - p = p->parentItem(); - } - setFocus(true); + forceFocus(); if (d->showInputPanelOnFocus) { if (hasFocus() && hadFocus && !isReadOnly()) { // re-open input panel on press if already focused |