diff options
author | Liang Qi <liang.qi@qt.io> | 2016-10-12 20:49:36 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-10-12 20:49:45 +0200 |
commit | b4cdfc4a12d2b9ebc79fe17a2f1aff67bd940d71 (patch) | |
tree | e7841ee2695a3ef180e186d2df971c8fc207d0f9 /src/quick | |
parent | 650b5db06b057abe2db40fb8d56223e17ba8c06a (diff) | |
parent | af002b8df9b084fd7f26e9eead9844aab36bdc4d (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: Ib31008e593442ca5813fb14ae6b02f7ab2577395
Diffstat (limited to 'src/quick')
-rw-r--r-- | src/quick/doc/src/concepts/input/focus.qdoc | 12 | ||||
-rw-r--r-- | src/quick/items/qquicklistview.cpp | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/util/qsgdefaultpainternode.cpp | 16 | ||||
-rw-r--r-- | src/quick/scenegraph/util/qsgdefaultpainternode_p.h | 2 |
4 files changed, 22 insertions, 10 deletions
diff --git a/src/quick/doc/src/concepts/input/focus.qdoc b/src/quick/doc/src/concepts/input/focus.qdoc index ec4e4ca2d9..fc1361f7ac 100644 --- a/src/quick/doc/src/concepts/input/focus.qdoc +++ b/src/quick/doc/src/concepts/input/focus.qdoc @@ -66,7 +66,7 @@ See also the \l {Keys}{Keys attached property} and \l {KeyNavigation}{KeyNavigat \section1 Querying the Active Focus Item Whether or not an \l Item has active focus can be queried through the -property \c {Item::activeFocus} property. For example, here we have a \l Text +\c {Item::activeFocus} property. For example, here we have a \l Text type whose text is determined by whether or not it has active focus. \snippet qml/focus/rectangle.qml active focus @@ -98,17 +98,17 @@ The code that imports and creates two MyWidget instances: The MyWidget code: \snippet qml/focus/MyWidget.qml mywidget -We would like to have the first MyWidget object to have the focus by setting its +We want the first \c MyWidget object to have the focus, so we set its \c focus property to \c true. However, by running the code, we can confirm that the second widget receives the focus. \image declarative-qmlfocus2.png Looking at both \c MyWidget and \c window code, the problem is evident - there -are three types that set the \c focus property set to \c true. The two -MyWidget sets the \c focus to \c true and the \c window component also sets the +are three types that set the \c focus property to \c true. The two +\c {MyWidget}s set the \c focus to \c true and the \c window component also sets the focus. Ultimately, only one type can have keyboard focus, and the system has -to decide which type receives the focus. When the second MyWidget is created, +to decide which type receives the focus. When the second \c MyWidget is created, it receives the focus because it is the last type to set its \c focus property to \c true. @@ -190,7 +190,7 @@ print the name of the current list item. \image declarative-qmlfocus5.png -While the example is simple, there are a lot going on behind the scenes. Whenever +While the example is simple, there is a lot going on behind the scenes. Whenever the current item changes, the \l ListView sets the delegate's \c {Item::focus} property. As the \l ListView is a focus scope, this doesn't affect the rest of the application. However, if the \l ListView itself has diff --git a/src/quick/items/qquicklistview.cpp b/src/quick/items/qquicklistview.cpp index a98a5c8f56..b9f4fc5d42 100644 --- a/src/quick/items/qquicklistview.cpp +++ b/src/quick/items/qquicklistview.cpp @@ -1761,7 +1761,7 @@ bool QQuickListViewPrivate::flick(AxisData &data, qreal minExtent, qreal maxExte State should \e never be stored in a delegate. ListView attaches a number of properties to the root item of the delegate, for example - \c {ListView:isCurrentItem}. In the following example, the root delegate item can access + \c ListView.isCurrentItem. In the following example, the root delegate item can access this attached property directly as \c ListView.isCurrentItem, while the child \c contactInfo object must refer to this property as \c wrapper.ListView.isCurrentItem. diff --git a/src/quick/scenegraph/util/qsgdefaultpainternode.cpp b/src/quick/scenegraph/util/qsgdefaultpainternode.cpp index 3e5ed72d0f..16625b889b 100644 --- a/src/quick/scenegraph/util/qsgdefaultpainternode.cpp +++ b/src/quick/scenegraph/util/qsgdefaultpainternode.cpp @@ -442,9 +442,21 @@ void QSGDefaultPainterNode::setContentsScale(qreal s) markDirty(DirtyMaterial); } -void QSGDefaultPainterNode::setFastFBOResizing(bool dynamic) +void QSGDefaultPainterNode::setFastFBOResizing(bool fastResizing) { - m_fastFBOResizing = dynamic; + if (m_fastFBOResizing == fastResizing) + return; + + m_fastFBOResizing = fastResizing; + updateFBOSize(); + + if ((m_preferredRenderTarget == QQuickPaintedItem::FramebufferObject + || m_preferredRenderTarget == QQuickPaintedItem::InvertedYFramebufferObject) + && (!m_fbo || (m_fbo && m_fbo->size() != m_fboSize))) { + m_dirtyRenderTarget = true; + m_dirtyGeometry = true; + m_dirtyTexture = true; + } } QImage QSGDefaultPainterNode::toImage() const diff --git a/src/quick/scenegraph/util/qsgdefaultpainternode_p.h b/src/quick/scenegraph/util/qsgdefaultpainternode_p.h index 3cabe01511..7e23264100 100644 --- a/src/quick/scenegraph/util/qsgdefaultpainternode_p.h +++ b/src/quick/scenegraph/util/qsgdefaultpainternode_p.h @@ -108,7 +108,7 @@ public: void setContentsScale(qreal s); qreal contentsScale() const { return m_contentsScale; } - void setFastFBOResizing(bool dynamic); + void setFastFBOResizing(bool fastResizing); bool fastFBOResizing() const { return m_fastFBOResizing; } void setTextureSize(const QSize &textureSize); |