diff options
-rw-r--r-- | demos/declarative/flickr/content/MediaLineEdit.qml | 1 | ||||
-rw-r--r-- | demos/declarative/webbrowser/webbrowser.qml | 2 | ||||
-rw-r--r-- | doc/src/declarative/basictypes.qdoc | 2 | ||||
-rw-r--r-- | src/declarative/fx/qfxitem.cpp | 66 | ||||
-rw-r--r-- | src/declarative/fx/qfxitem.h | 3 | ||||
-rw-r--r-- | src/declarative/fx/qfxitem_p.h | 1 | ||||
-rw-r--r-- | src/declarative/fx/qfxtextedit.cpp | 1 | ||||
-rw-r--r-- | src/declarative/fx/qfxwebview.cpp | 1 |
8 files changed, 29 insertions, 48 deletions
diff --git a/demos/declarative/flickr/content/MediaLineEdit.qml b/demos/declarative/flickr/content/MediaLineEdit.qml index 4f6fed1..0f74295 100644 --- a/demos/declarative/flickr/content/MediaLineEdit.qml +++ b/demos/declarative/flickr/content/MediaLineEdit.qml @@ -98,7 +98,6 @@ Item { id: Proxy anchors.left: Container.left anchors.fill: Container - focusable: true targets: [(ReturnKey), (Editor)] } KeyActions { diff --git a/demos/declarative/webbrowser/webbrowser.qml b/demos/declarative/webbrowser/webbrowser.qml index 4c6a177..d5416c6 100644 --- a/demos/declarative/webbrowser/webbrowser.qml +++ b/demos/declarative/webbrowser/webbrowser.qml @@ -120,7 +120,6 @@ Item { id: proxy anchors.left: UrlBox.left anchors.fill: UrlBox - focusable: true targets: [keyActions,EditUrl] } KeyActions { @@ -191,7 +190,6 @@ Item { url: WebBrowser.url smooth: !Flick.moving fillColor: "white" - focusable: true focus: true idealWidth: Flick.width diff --git a/doc/src/declarative/basictypes.qdoc b/doc/src/declarative/basictypes.qdoc index 2ef91e6..a22af0f 100644 --- a/doc/src/declarative/basictypes.qdoc +++ b/doc/src/declarative/basictypes.qdoc @@ -39,7 +39,7 @@ Setting bools looks like this: \code - Item { focusable: true; clip: false } + Item { focus: true; clip: false } \endcode \note Technically bool treats an empty string, "false" and "0" as false and diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp index 686ec8d..2433a83 100644 --- a/src/declarative/fx/qfxitem.cpp +++ b/src/declarative/fx/qfxitem.cpp @@ -258,11 +258,6 @@ void QFxContents::setItem(QFxItem *item) */ /*! - \property QFxItem::activeFocus - This property indicates whether the item has the active focus. - */ - -/*! \fn void QFxItem::activeFocusChanged() This signal is emitted when this item gains active focus. @@ -1849,16 +1844,6 @@ QList<QFxTransform *> *QFxItem::transform() } /*! - \property QFxItem::focus - This property holds the item's focus state. -*/ - -/*! - \property QFxItem::focusable - This property holds whether the item has focus state. -*/ - -/*! Returns true if the item is visible; otherwise returns false. An item is considered visible if its opacity is not 0. @@ -2192,12 +2177,6 @@ QPointF QFxItem::transformOriginPoint() const return d->transformOrigin(); } -void QFxItem::setFocus(bool focus) -{ - Q_UNUSED(focus) - return; -} - qreal QFxItem::z() const { Q_D(const QFxItem); @@ -2414,20 +2393,43 @@ QFxItem *QFxItem::mouseGrabberItem() const return 0; } -bool QFxItem::isFocusable() const +/*! + \qmlproperty bool Item::focus + This property indicates whether the item has has an active focus request. Set this + property to true to request active focus. +*/ + +bool QFxItem::hasFocus() const { return false; } -void QFxItem::setFocusable(bool) +void QFxItem::setFocus(bool focus) { + Q_UNUSED(focus) + return; } -bool QFxItem::hasFocus() const +/*! + \qmlproperty bool Item::activeFocus + This property indicates whether the item has the active focus. +*/ + +bool QFxItem::hasActiveFocus() const +{ + return false; +} + +bool QFxItem::activeFocusPanel() const { return false; } +void QFxItem::setActiveFocusPanel(bool b) +{ + Q_UNUSED(b) +} + bool QFxItem::sceneEventFilter(QGraphicsItem *w, QEvent *e) { switch(e->type()) { @@ -2462,6 +2464,7 @@ void QFxItem::setOptions(Options options, bool set) setFlag(QGraphicsItem::ItemHasNoContents, !(d->options & HasContents)); setFiltersChildEvents(d->options & ChildMouseFilter); + setFlag(QGraphicsItem::ItemAcceptsInputMethod, (d->options & AcceptsInputMethods)); if ((old & MouseFilter) != (d->options & MouseFilter)) { if (d->options & MouseFilter) @@ -2488,21 +2491,6 @@ void QFxItem::setParent(QFxItem *p) parentChanged(p, oldParent); } -bool QFxItem::activeFocusPanel() const -{ - return false; -} - -void QFxItem::setActiveFocusPanel(bool b) -{ - Q_UNUSED(b) -} - -bool QFxItem::hasActiveFocus() const -{ - return false; -} - void QFxItem::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *) { paintContents(*p); diff --git a/src/declarative/fx/qfxitem.h b/src/declarative/fx/qfxitem.h index 0203e6e..8c8bcc4 100644 --- a/src/declarative/fx/qfxitem.h +++ b/src/declarative/fx/qfxitem.h @@ -129,7 +129,6 @@ class Q_DECLARATIVE_EXPORT QFxItem : public QGraphicsObject, public QmlParserSta Q_PROPERTY(qreal scale READ scale WRITE setScale NOTIFY scaleChanged) Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity NOTIFY opacityChanged) Q_PROPERTY(bool clip READ clip WRITE setClip) - Q_PROPERTY(bool focusable READ isFocusable WRITE setFocusable) Q_PROPERTY(bool focus READ hasFocus WRITE setFocus NOTIFY focusChanged) Q_PROPERTY(bool activeFocus READ hasActiveFocus NOTIFY activeFocusChanged) Q_PROPERTY(QList<QFxTransform *>* transform READ transform) @@ -266,8 +265,6 @@ public: QFxItem *mouseGrabberItem() const; - virtual bool isFocusable() const; - void setFocusable(bool); virtual bool hasFocus() const; void setFocus(bool); bool activeFocusPanel() const; diff --git a/src/declarative/fx/qfxitem_p.h b/src/declarative/fx/qfxitem_p.h index 93bcf6c..4a0ea18 100644 --- a/src/declarative/fx/qfxitem_p.h +++ b/src/declarative/fx/qfxitem_p.h @@ -94,6 +94,7 @@ public: _baselineOffset.invalidate(); q->setAcceptedMouseButtons(Qt::NoButton); q->setFlag(QGraphicsItem::ItemHasNoContents, true); + q->setFlag(QGraphicsItem::ItemIsFocusable, true); } QString _id; diff --git a/src/declarative/fx/qfxtextedit.cpp b/src/declarative/fx/qfxtextedit.cpp index cdd94b5..6d05e72 100644 --- a/src/declarative/fx/qfxtextedit.cpp +++ b/src/declarative/fx/qfxtextedit.cpp @@ -66,7 +66,6 @@ TextEdit { id: edit text: "<b>Hello</b> <i>World!</i>" focus: true - focusable: true font.family: "Helvetica" font.size: 20 color: "blue" diff --git a/src/declarative/fx/qfxwebview.cpp b/src/declarative/fx/qfxwebview.cpp index da10004..80d965d 100644 --- a/src/declarative/fx/qfxwebview.cpp +++ b/src/declarative/fx/qfxwebview.cpp @@ -237,7 +237,6 @@ void QFxWebView::init() setAcceptedMouseButtons(Qt::LeftButton); setOptions(HasContents | MouseEvents); - setFocusable(true); d->page = 0; } |