diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-02-12 14:21:44 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-02-12 14:21:44 +0100 |
commit | a20948b726c1e0edd70761e8e115a53ba5526a51 (patch) | |
tree | cdcf3367f67c465f005a97dec6141e5a4e024781 | |
parent | 3434a0d5f8cb4bb5008caec3772c4e398986196f (diff) | |
parent | 1c54d411ad6e98c3779a412750aec8b93d587872 (diff) | |
download | qtquickcontrols-a20948b726c1e0edd70761e8e115a53ba5526a51.tar.gz |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
src/layouts/qquicklinearlayout.cpp
Change-Id: Ib24dab43c37fc0f3f6a85398766f102a1ac833c3
-rw-r--r-- | examples/quick/controls/touch/main.qml | 16 | ||||
-rw-r--r-- | src/controls/ComboBox.qml | 4 | ||||
-rw-r--r-- | src/controls/RadioButton.qml | 1 | ||||
-rw-r--r-- | src/controls/StackView.qml | 4 | ||||
-rw-r--r-- | src/controls/StackViewDelegate.qml | 3 | ||||
-rw-r--r-- | src/controls/TableViewColumn.qml | 4 | ||||
-rw-r--r-- | src/controls/TextArea.qml | 4 | ||||
-rw-r--r-- | src/controls/TextField.qml | 6 | ||||
-rw-r--r-- | src/controls/doc/qtquickcontrols.qdocconf | 2 | ||||
-rw-r--r-- | src/layouts/qquicklinearlayout.cpp | 5 | ||||
-rw-r--r-- | tests/auto/controls/data/tst_rowlayout.qml | 36 |
11 files changed, 58 insertions, 27 deletions
diff --git a/examples/quick/controls/touch/main.qml b/examples/quick/controls/touch/main.qml index ab5d534f..163ec937 100644 --- a/examples/quick/controls/touch/main.qml +++ b/examples/quick/controls/touch/main.qml @@ -52,16 +52,6 @@ ApplicationWindow { anchors.fill: parent } - // Implements back key navigation - Keys.onReleased: { - if (event.key === Qt.Key_Back) { - if (stackView.depth > 1) { - stackView.pop(); - event.accepted = true; - } else { Qt.quit(); } - } - } - toolBar: BorderImage { border.bottom: 8 source: "images/toolbar.png" @@ -133,6 +123,12 @@ ApplicationWindow { StackView { id: stackView anchors.fill: parent + // Implements back key navigation + focus: true + Keys.onReleased: if (event.key === Qt.Key_Back && stackView.depth > 1) { + stackView.pop(); + event.accepted = true; + } initialItem: Item { width: parent.width diff --git a/src/controls/ComboBox.qml b/src/controls/ComboBox.qml index 21d473d6..f3cde537 100644 --- a/src/controls/ComboBox.qml +++ b/src/controls/ComboBox.qml @@ -195,8 +195,8 @@ Control { an intermediate state. The accepted signal will only be sent if the text is in an acceptable state when enter is pressed. - Currently supported validators are \l{QtQuick2::IntValidator}, - \l{QtQuick2::DoubleValidator}, and \l{QtQuick2::RegExpValidator}. An + Currently supported validators are \l{QtQuick::}{IntValidator}, + \l{QtQuick::}{DoubleValidator}, and \l{QtQuick::}{RegExpValidator}. An example of using validators is shown below, which allows input of integers between 11 and 31 into the text field: diff --git a/src/controls/RadioButton.qml b/src/controls/RadioButton.qml index 5ab7f68c..2947093d 100644 --- a/src/controls/RadioButton.qml +++ b/src/controls/RadioButton.qml @@ -82,6 +82,7 @@ AbstractCheckable { activeFocusOnTab: true + Accessible.name: text Accessible.role: Accessible.RadioButton /*! diff --git a/src/controls/StackView.qml b/src/controls/StackView.qml index d8089174..2397e5e4 100644 --- a/src/controls/StackView.qml +++ b/src/controls/StackView.qml @@ -312,7 +312,7 @@ import QtQuick.Controls.Private 1.0 contains the properties \c enterItem and \c exitItem. You set the target of your inner animations to those items. Since the same items instance can be pushed several times to a StackView, you should always override - \l {StackViewDelegate::transitionFinished(properties)}{StackViewDelegate.transitionFinished(properties)}. + \l {StackViewDelegate::transitionFinished()}{StackViewDelegate.transitionFinished()}. Implement this function to reset any properties animated on the exitItem so that later transitions can expect the items to be in a default state. @@ -360,7 +360,7 @@ import QtQuick.Controls.Private 1.0 \section2 Advanced usage When the StackView needs a new transition, it first calls - \l {StackViewDelegate::getTransition(properties)}{StackViewDelegate.getTransition(properties)}. + \l {StackViewDelegate::getTransition()}{StackViewDelegate.getTransition()}. The base implementation of this function just looks for a property named \c properties.name inside itself (root), which is how it finds \c {property Component pushTransition} in the examples above. diff --git a/src/controls/StackViewDelegate.qml b/src/controls/StackViewDelegate.qml index e77b8235..40f9437c 100644 --- a/src/controls/StackViewDelegate.qml +++ b/src/controls/StackViewDelegate.qml @@ -47,8 +47,7 @@ import QtQuick 2.1 \brief A delegate used by StackView for loading transitions. - See the documentation for the \l {QtQuick.Controls1::StackView} {StackView} - component. + See the documentation for the \l {StackView} component. */ QtObject { diff --git a/src/controls/TableViewColumn.qml b/src/controls/TableViewColumn.qml index 30551f90..a5ba2e75 100644 --- a/src/controls/TableViewColumn.qml +++ b/src/controls/TableViewColumn.qml @@ -90,7 +90,7 @@ QtObject { \li Text.ElideMiddle \li Text.ElideRight - the default \endlist - \sa {QtQuick2::}{Text::elide} */ + \sa {QtQuick::}{Text::elide} */ property int elideMode: Text.ElideRight /*! \qmlproperty enumeration TableViewColumn::horizontalAlignment @@ -102,7 +102,7 @@ QtObject { \li Text.AlignHCenter \li Text.AlignJustify \endlist - \sa {QtQuick2::}{Text::horizontalAlignment} */ + \sa {QtQuick::}{Text::horizontalAlignment} */ property int horizontalAlignment: Text.AlignLeft /*! The delegate of the column. This can be used to set the diff --git a/src/controls/TextArea.qml b/src/controls/TextArea.qml index e551d46e..751e7ce0 100644 --- a/src/controls/TextArea.qml +++ b/src/controls/TextArea.qml @@ -405,8 +405,6 @@ ScrollView { This property contains the link string when user hovers a link embedded in the text. The link must be in rich text or HTML format and the link string provides access to the particular link. - - \sa onLinkHovered */ readonly property alias hoveredLink: edit.hoveredLink @@ -718,7 +716,7 @@ ScrollView { wrapMode: TextEdit.WordWrap textMargin: 4 - selectByMouse: true + selectByMouse: Qt.platform.os !== "android" // Workaround for QTBUG-36515 readOnly: false Keys.forwardTo: area diff --git a/src/controls/TextField.qml b/src/controls/TextField.qml index d74ed0ac..b173c95d 100644 --- a/src/controls/TextField.qml +++ b/src/controls/TextField.qml @@ -375,8 +375,8 @@ Control { an intermediate state. The accepted signal will only be sent if the text is in an acceptable state when enter is pressed. - Currently supported validators are \l{QtQuick2::IntValidator}, - \l{QtQuick2::DoubleValidator}, and \l{QtQuick2::RegExpValidator}. An + Currently supported validators are \l{QtQuick::}{IntValidator}, + \l{QtQuick::}{DoubleValidator}, and \l{QtQuick::}{RegExpValidator}. An example of using validators is shown below, which allows input of integers between 11 and 31 into the text input: @@ -582,7 +582,7 @@ Control { TextInput { id: textInput focus: true - selectByMouse: true + selectByMouse: Qt.platform.os !== "android" // Workaround for QTBUG-36515 selectionColor: __panel ? __panel.selectionColor : "darkred" selectedTextColor: __panel ? __panel.selectedTextColor : "white" diff --git a/src/controls/doc/qtquickcontrols.qdocconf b/src/controls/doc/qtquickcontrols.qdocconf index 4c97d5c8..4306477c 100644 --- a/src/controls/doc/qtquickcontrols.qdocconf +++ b/src/controls/doc/qtquickcontrols.qdocconf @@ -29,7 +29,7 @@ qhp.QtQuickControls.subprojects.qtquickcontrolsstyles.title = Qt Quick Cont qhp.QtQuickControls.subprojects.qtquickcontrolsstyles.indexTitle = Qt Quick Controls Styles Structure qhp.QtQuickControls.subprojects.qtquickcontrolsstyles.type = manual -depends = qtqml qtquick qtwidgets qtdoc qtquicklayouts +depends = qtqml qtquick qtgui qtwidgets qtdoc qtquicklayouts # Specify the install path under QT_INSTALL_EXAMPLES # Examples will be installed under quick/controls - 'controls' subdirectory diff --git a/src/layouts/qquicklinearlayout.cpp b/src/layouts/qquicklinearlayout.cpp index d09a07dc..d3e5dd8f 100644 --- a/src/layouts/qquicklinearlayout.cpp +++ b/src/layouts/qquicklinearlayout.cpp @@ -493,9 +493,10 @@ void QQuickGridLayoutBase::rearrange(const QSizeF &size) qSwap(left, right); */ - d->engine.setGeometries(QRectF(QPointF(0,0), size), d->styleInfo); - + // Set m_dirty to false in case size hint changes during arrangement. + // This could happen if there is a binding like implicitWidth: height QQuickLayout::rearrange(size); + d->engine.setGeometries(QRectF(QPointF(0,0), size), d->styleInfo); } bool QQuickGridLayoutBase::shouldIgnoreItem(QQuickItem *child, QQuickLayoutAttached *&info, QSizeF *sizeHints) diff --git a/tests/auto/controls/data/tst_rowlayout.qml b/tests/auto/controls/data/tst_rowlayout.qml index c82a16d4..9db6c803 100644 --- a/tests/auto/controls/data/tst_rowlayout.qml +++ b/tests/auto/controls/data/tst_rowlayout.qml @@ -536,6 +536,42 @@ Item { layout.destroy() } + + Component { + id: layout_change_implicitWidth_during_rearrange + ColumnLayout { + width: 100 + height: 20 + RowLayout { + spacing: 0 + Rectangle { + Layout.fillHeight: true + Layout.fillWidth: false + implicitWidth: height + color: "red" + } + Rectangle { + Layout.fillHeight: true + Layout.fillWidth: true + color: "blue" + } + } + } + } + + function test_change_implicitWidth_during_rearrange() { + var layout = layout_change_implicitWidth_during_rearrange.createObject(container) + var red = layout.children[0].children[0] + var blue = layout.children[0].children[1] + waitForRendering(layout); + tryCompare(red, 'width', 20) + tryCompare(blue, 'width', 80) + layout.height = 40 + tryCompare(red, 'width', 40) + tryCompare(blue, 'width', 60) + layout.destroy() + } + Component { id: layout_addIgnoredItem_Component RowLayout { |