summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-10-02 14:45:05 +0200
committerUlf Hermann <ulf.hermann@qt.io>2019-10-04 11:15:31 +0200
commit59264fc24e3806a7e43379a2b8c610148f89cccb (patch)
treefb8ea77d461c5c68a98b59b9bd4e152606795028
parent6eac099fa98b6dbe5a01ad90e4a1348729b1332b (diff)
downloadqtquickcontrols-59264fc24e3806a7e43379a2b8c610148f89cccb.tar.gz
Make restoreMode on all Binding elements explicit
The default is going to change in 5.15. Change-Id: Ib17500791476bd45ed2c7c3736186897fb63d7a0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--examples/quickcontrols/extras/flat/main.qml4
-rw-r--r--src/controls/ApplicationWindow.qml31
-rw-r--r--src/controls/Button.qml7
-rw-r--r--src/controls/ComboBox.qml4
-rw-r--r--src/controls/MenuBar.qml4
-rw-r--r--src/controls/Private/BasicTableView.qml4
-rw-r--r--src/controls/Private/ColumnMenuContent.qml4
-rw-r--r--src/controls/Private/MenuContentItem.qml7
-rw-r--r--src/controls/Private/ScrollViewHelper.qml13
-rw-r--r--src/controls/Private/TabBar.qml4
-rw-r--r--src/controls/Private/ToolMenuButton.qml7
-rw-r--r--src/controls/ScrollView.qml7
-rw-r--r--src/controls/Slider.qml4
-rw-r--r--src/controls/Styles/Android/ApplicationWindowStyle.qml4
-rw-r--r--src/controls/Styles/Android/GroupBoxStyle.qml29
-rw-r--r--src/controls/Styles/Android/SpinBoxStyle.qml29
-rw-r--r--src/controls/Styles/Android/drawables/DrawableLoader.qml92
-rw-r--r--src/controls/Styles/Desktop/MenuStyle.qml4
-rw-r--r--src/dialogs/DefaultFileDialog.qml7
-rw-r--r--src/extras/DelayButton.qml4
-rw-r--r--src/extras/Styles/Flat/ApplicationWindowStyle.qml5
-rw-r--r--src/extras/Styles/Flat/GroupBoxStyle.qml5
-rw-r--r--src/extras/Tumbler.qml4
-rw-r--r--tests/auto/controls/data/toolbutton/tb_checkableActionWithinExclusiveGroup.qml7
24 files changed, 233 insertions, 57 deletions
diff --git a/examples/quickcontrols/extras/flat/main.qml b/examples/quickcontrols/extras/flat/main.qml
index d91c2063..661225eb 100644
--- a/examples/quickcontrols/extras/flat/main.qml
+++ b/examples/quickcontrols/extras/flat/main.qml
@@ -48,6 +48,7 @@
**
****************************************************************************/
+import QtQml 2.14 as Qml
import QtQuick 2.4
import QtQuick.Layouts 1.0
import QtQuick.Controls 1.4
@@ -138,11 +139,12 @@ ApplicationWindow {
height: parent.height
// Don't let the menus become visible when resizing the window
- Binding {
+ Qml.Binding {
target: controlsMenu
property: "x"
value: container.x - controlsMenu.width
when: !xBehavior.enabled && !xNumberAnimation.running && currentMenu == -1
+ restoreMode: Binding.RestoreBinding
}
Behavior on x {
diff --git a/src/controls/ApplicationWindow.qml b/src/controls/ApplicationWindow.qml
index b739ecae..7d215556 100644
--- a/src/controls/ApplicationWindow.qml
+++ b/src/controls/ApplicationWindow.qml
@@ -37,6 +37,7 @@
**
****************************************************************************/
+import QtQml 2.14 as Qml
import QtQuick.Window 2.2
import QtQuick 2.2
import QtQuick.Controls 1.2
@@ -171,19 +172,21 @@ Window {
/*! \internal */
property real __width: 0
- Binding {
+ Qml.Binding {
target: root
property: "__width"
when: (root.minimumWidth <= root.maximumWidth) && !contentArea.__noImplicitWidthGiven
value: Math.max(Math.min(root.maximumWidth, contentArea.implicitWidth), root.minimumWidth)
+ restoreMode: Binding.RestoreBinding
}
/*! \internal */
property real __height: 0
- Binding {
+ Qml.Binding {
target: root
property: "__height"
when: (root.minimumHeight <= root.maximumHeight) && !contentArea.__noImplicitHeightGiven
value: Math.max(Math.min(root.maximumHeight, contentArea.implicitHeight + __topBottomMargins), root.minimumHeight)
+ restoreMode: Binding.RestoreBinding
}
/* As soon as an application developer writes
width: 200
@@ -224,16 +227,32 @@ Window {
onStatusChanged: if (status === Loader.Error) console.error("Failed to load Style for", root)
}
- Binding { target: toolBar; property: "parent"; value: __panel.toolBarArea }
- Binding { target: statusBar; property: "parent"; value: __panel.statusBarArea }
+ Qml.Binding {
+ target: toolBar
+ property: "parent"
+ value: __panel.toolBarArea
+ restoreMode: Binding.RestoreBinding
+ }
+ Qml.Binding {
+ target: statusBar
+ property: "parent"
+ value: __panel.statusBarArea
+ restoreMode: Binding.RestoreBinding
+ }
- Binding {
+ Qml.Binding {
property: "parent"
target: menuBar ? menuBar.__contentItem : null
when: menuBar && !menuBar.__isNative
value: __panel.menuBarArea
+ restoreMode: Binding.RestoreBinding
+ }
+ Qml.Binding {
+ target: menuBar
+ property: "__parentWindow"
+ value: root
+ restoreMode: Binding.RestoreBinding
}
- Binding { target: menuBar; property: "__parentWindow"; value: root }
Keys.forwardTo: menuBar ? [menuBar.__contentItem, __panel] : []
diff --git a/src/controls/Button.qml b/src/controls/Button.qml
index 71e657ec..73b3b349 100644
--- a/src/controls/Button.qml
+++ b/src/controls/Button.qml
@@ -37,6 +37,7 @@
**
****************************************************************************/
+import QtQml 2.14 as Qml
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
@@ -93,16 +94,18 @@ BasicButton {
style: Settings.styleComponent(Settings.style, "ButtonStyle.qml", button)
- Binding {
+ Qml.Binding {
target: menu
property: "__minimumWidth"
value: button.__panel.width
+ restoreMode: Binding.RestoreBinding
}
- Binding {
+ Qml.Binding {
target: menu
property: "__visualItem"
value: button
+ restoreMode: Binding.RestoreBinding
}
Connections {
diff --git a/src/controls/ComboBox.qml b/src/controls/ComboBox.qml
index 7c6f93a7..94bbc0cd 100644
--- a/src/controls/ComboBox.qml
+++ b/src/controls/ComboBox.qml
@@ -37,6 +37,7 @@
**
****************************************************************************/
+import QtQml 2.14 as Qml
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
@@ -549,11 +550,12 @@ Control {
}
}
- Binding {
+ Qml.Binding {
target: input
property: "text"
value: popup.currentText
when: input.editTextMatches
+ restoreMode: Binding.RestoreBinding
}
onTextRoleChanged: popup.resolveTextValue(textRole)
diff --git a/src/controls/MenuBar.qml b/src/controls/MenuBar.qml
index a98d0e81..2628d064 100644
--- a/src/controls/MenuBar.qml
+++ b/src/controls/MenuBar.qml
@@ -37,6 +37,7 @@
**
****************************************************************************/
+import QtQml 2.14 as Qml
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.1
@@ -130,11 +131,12 @@ MenuBarPrivate {
width: implicitWidth || root.__contentItem.preferredWidth
height: Math.max(row.height + d.heightPadding, item ? item.implicitHeight : 0)
- Binding {
+ Qml.Binding {
// Make sure the styled menu bar is in the background
target: menuBarLoader.item
property: "z"
value: menuMouseArea.z - 1
+ restoreMode: Binding.RestoreBinding
}
QtObject {
diff --git a/src/controls/Private/BasicTableView.qml b/src/controls/Private/BasicTableView.qml
index 6c7c5511..48e6eadc 100644
--- a/src/controls/Private/BasicTableView.qml
+++ b/src/controls/Private/BasicTableView.qml
@@ -48,6 +48,7 @@
// We mean it.
//
+import QtQml 2.14 as Qml
import QtQuick 2.6
import QtQuick.Controls 1.5
import QtQuick.Controls.Private 1.0
@@ -426,7 +427,7 @@ ScrollView {
&& !transientScrollBars && Qt.platform.os === "osx" ?
__verticalScrollBar.width + __scroller.scrollBarSpacing + root.__style.padding.right : 0
- Binding {
+ Qml.Binding {
// On Mac, we reserve the vSB space in the contentItem because the vSB should
// appear under the header. Unfortunately, the ListView header won't expand
// beyond the ListView's boundaries, that's why we need to ressort to this.
@@ -434,6 +435,7 @@ ScrollView {
when: Qt.platform.os === "osx"
property: "verticalScrollbarOffset"
value: 0
+ restoreMode: Binding.RestoreBinding
}
function incrementCurrentIndexBlocking() {
diff --git a/src/controls/Private/ColumnMenuContent.qml b/src/controls/Private/ColumnMenuContent.qml
index e130b2a2..5f8b4d68 100644
--- a/src/controls/Private/ColumnMenuContent.qml
+++ b/src/controls/Private/ColumnMenuContent.qml
@@ -37,6 +37,7 @@
**
****************************************************************************/
+import QtQml 2.14 as Qml
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
@@ -242,9 +243,10 @@ Item {
? ListView.Center : ListView.Beginning)
}
- Binding {
+ Qml.Binding {
target: scrollView.__verticalScrollBar
property: "singleStep"
value: itemHeight
+ restoreMode: Binding.RestoreBinding
}
}
diff --git a/src/controls/Private/MenuContentItem.qml b/src/controls/Private/MenuContentItem.qml
index fe8e7726..9fcb2f0f 100644
--- a/src/controls/Private/MenuContentItem.qml
+++ b/src/controls/Private/MenuContentItem.qml
@@ -37,6 +37,7 @@
**
****************************************************************************/
+import QtQml 2.14 as Qml
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.1
@@ -155,11 +156,12 @@ Loader {
Keys.onReturnPressed: d.triggerCurrent()
Keys.onEnterPressed: d.triggerCurrent()
- Binding {
+ Qml.Binding {
// Make sure the styled frame is in the background
target: item
property: "z"
value: content.z - 1
+ restoreMode: Binding.RestoreBinding
}
ColumnMenuContent {
@@ -268,11 +270,12 @@ Loader {
d.mnemonicsMap[title[ampersandPos + 1].toUpperCase()] = menuItemLoader
}
- Binding {
+ Qml.Binding {
target: menuItemLoader.item
property: "width"
property alias menuItem: menuItemLoader.item
value: menuItem ? Math.max(__menu.__minimumWidth, content.width) - 2 * menuItem.x : 0
+ restoreMode: Binding.RestoreBinding
}
}
}
diff --git a/src/controls/Private/ScrollViewHelper.qml b/src/controls/Private/ScrollViewHelper.qml
index 3f309bb0..c16c55b8 100644
--- a/src/controls/Private/ScrollViewHelper.qml
+++ b/src/controls/Private/ScrollViewHelper.qml
@@ -37,6 +37,7 @@
**
****************************************************************************/
+import QtQml 2.14 as Qml
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
@@ -147,17 +148,19 @@ Item {
flickableItem.contentX = value + flickableItem.originX
}
}
- Binding {
+ Qml.Binding {
target: hscrollbar.__panel
property: "raised"
value: vscrollbar.active || scrollHelper.active
when: hscrollbar.isTransient
+ restoreMode: Binding.RestoreBinding
}
- Binding {
+ Qml.Binding {
target: hscrollbar.__panel
property: "visible"
value: true
when: !hscrollbar.isTransient || scrollHelper.active
+ restoreMode: Binding.RestoreBinding
}
function flash() {
if (hscrollbar.isTransient) {
@@ -201,17 +204,19 @@ Item {
flickableItem.contentY = value + flickableItem.originY
}
}
- Binding {
+ Qml.Binding {
target: vscrollbar.__panel
property: "raised"
value: hscrollbar.active || scrollHelper.active
when: vscrollbar.isTransient
+ restoreMode: Binding.RestoreBinding
}
- Binding {
+ Qml.Binding {
target: vscrollbar.__panel
property: "visible"
value: true
when: !vscrollbar.isTransient || scrollHelper.active
+ restoreMode: Binding.RestoreBinding
}
function flash() {
if (vscrollbar.isTransient) {
diff --git a/src/controls/Private/TabBar.qml b/src/controls/Private/TabBar.qml
index bf76b977..1186968d 100644
--- a/src/controls/Private/TabBar.qml
+++ b/src/controls/Private/TabBar.qml
@@ -37,6 +37,7 @@
**
****************************************************************************/
+import QtQml 2.14 as Qml
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
@@ -170,11 +171,12 @@ FocusScope {
focus: true
enabled: modelData.enabled
- Binding {
+ Qml.Binding {
target: tabbar
when: selected
property: "__selectedTabRect"
value: Qt.rect(x, y, width, height)
+ restoreMode: Binding.RestoreBinding
}
drag.target: tabsMovable ? tabloader : null
diff --git a/src/controls/Private/ToolMenuButton.qml b/src/controls/Private/ToolMenuButton.qml
index 2366d0c9..e6fba40c 100644
--- a/src/controls/Private/ToolMenuButton.qml
+++ b/src/controls/Private/ToolMenuButton.qml
@@ -37,6 +37,7 @@
**
****************************************************************************/
+import QtQml 2.14 as Qml
import QtQuick 2.4
import QtQuick.Controls 1.3
import QtQuick.Controls.Private 1.0
@@ -110,15 +111,17 @@ FocusScope {
}
}
- Binding {
+ Qml.Binding {
target: menu
property: "__minimumWidth"
value: button.width
+ restoreMode: Binding.RestoreBinding
}
- Binding {
+ Qml.Binding {
target: menu
property: "__visualItem"
value: button
+ restoreMode: Binding.RestoreBinding
}
}
diff --git a/src/controls/ScrollView.qml b/src/controls/ScrollView.qml
index b0df615e..951fe65e 100644
--- a/src/controls/ScrollView.qml
+++ b/src/controls/ScrollView.qml
@@ -37,6 +37,7 @@
**
****************************************************************************/
+import QtQml 2.14 as Qml
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
@@ -224,18 +225,20 @@ FocusScope {
property alias __control: root
}
- Binding {
+ Qml.Binding {
target: flickableItem
property: "contentHeight"
when: contentItem !== flickableItem
value: contentItem ? contentItem.height : 0
+ restoreMode: Binding.RestoreBinding
}
- Binding {
+ Qml.Binding {
target: flickableItem
when: contentItem !== flickableItem
property: "contentWidth"
value: contentItem ? contentItem.width : 0
+ restoreMode: Binding.RestoreBinding
}
Connections {
diff --git a/src/controls/Slider.qml b/src/controls/Slider.qml
index 07ad74c4..ff2f0c23 100644
--- a/src/controls/Slider.qml
+++ b/src/controls/Slider.qml
@@ -37,6 +37,7 @@
**
****************************************************************************/
+import QtQml 2.14 as Qml
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
@@ -310,11 +311,12 @@ Control {
// During the drag, we simply ignore the position set from the range, this
// means that setting a value while dragging will not "interrupt" the
// dragging activity.
- Binding {
+ Qml.Binding {
when: !mouseArea.drag.active
target: fakeHandle
property: __horizontal ? "x" : "y"
value: range.position
+ restoreMode: Binding.RestoreBinding
}
WheelArea {
diff --git a/src/controls/Styles/Android/ApplicationWindowStyle.qml b/src/controls/Styles/Android/ApplicationWindowStyle.qml
index c8201de7..de1184ff 100644
--- a/src/controls/Styles/Android/ApplicationWindowStyle.qml
+++ b/src/controls/Styles/Android/ApplicationWindowStyle.qml
@@ -37,6 +37,7 @@
**
****************************************************************************/
+import QtQml 2.14 as Qml
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.3
@@ -111,12 +112,13 @@ QtObject {
items: control.menuBar ? control.menuBar.menus : []
}
- Binding {
+ Qml.Binding {
target: control.toolBar
property: "__menu"
value: proxyMenu.items.length > 1 ? proxyMenu :
proxyMenu.items.length === 1 ? proxyMenu.items[0] : null
when: hasToolBar
+ restoreMode: Binding.RestoreBinding
}
}
}
diff --git a/src/controls/Styles/Android/GroupBoxStyle.qml b/src/controls/Styles/Android/GroupBoxStyle.qml
index bd077d5a..f312870d 100644
--- a/src/controls/Styles/Android/GroupBoxStyle.qml
+++ b/src/controls/Styles/Android/GroupBoxStyle.qml
@@ -37,6 +37,7 @@
**
****************************************************************************/
+import QtQml 2.14 as Qml
import QtQuick 2.2
import QtQuick.Window 2.2
import QtQuick.Controls 1.2
@@ -54,10 +55,30 @@ GroupBoxStyle {
readonly property real contentMargin: label.implicitHeight / 3
readonly property real topMargin: control.checkable ? indicator.height : label.height
- Binding { target: root; property: "padding.top"; value: topMargin + contentMargin }
- Binding { target: root; property: "padding.left"; value: contentMargin }
- Binding { target: root; property: "padding.right"; value: contentMargin }
- Binding { target: root; property: "padding.bottom"; value: contentMargin }
+ Qml.Binding {
+ target: root
+ property: "padding.top"
+ value: topMargin + contentMargin
+ restoreMode: Binding.RestoreBinding
+ }
+ Qml.Binding {
+ target: root
+ property: "padding.left"
+ value: contentMargin
+ restoreMode: Binding.RestoreBinding
+ }
+ Qml.Binding {
+ target: root
+ property: "padding.right"
+ value: contentMargin
+ restoreMode: Binding.RestoreBinding
+ }
+ Qml.Binding {
+ target: root
+ property: "padding.bottom"
+ value: contentMargin
+ restoreMode: Binding.RestoreBinding
+ }
DrawableLoader {
anchors.top: parent.top
diff --git a/src/controls/Styles/Android/SpinBoxStyle.qml b/src/controls/Styles/Android/SpinBoxStyle.qml
index 74126e9a..82a63dd8 100644
--- a/src/controls/Styles/Android/SpinBoxStyle.qml
+++ b/src/controls/Styles/Android/SpinBoxStyle.qml
@@ -37,6 +37,7 @@
**
****************************************************************************/
+import QtQml 2.14 as Qml
import QtQuick 2.4
import QtQuick.Window 2.2
import QtQuick.Controls 1.2
@@ -72,10 +73,30 @@ Style {
styleDef: panel.styleDef.View_background
}
- Binding { target: style; property: "padding.top"; value: bg.padding.top }
- Binding { target: style; property: "padding.left"; value: bg.padding.left }
- Binding { target: style; property: "padding.right"; value: bg.padding.right }
- Binding { target: style; property: "padding.bottom"; value: bg.padding.bottom }
+ Qml.Binding {
+ target: style
+ property: "padding.top"
+ value: bg.padding.top
+ restoreMode: Binding.RestoreBinding
+ }
+ Qml.Binding {
+ target: style
+ property: "padding.left"
+ value: bg.padding.left
+ restoreMode: Binding.RestoreBinding
+ }
+ Qml.Binding {
+ target: style
+ property: "padding.right"
+ value: bg.padding.right
+ restoreMode: Binding.RestoreBinding
+ }
+ Qml.Binding {
+ target: style
+ property: "padding.bottom"
+ value: bg.padding.bottom
+ restoreMode: Binding.RestoreBinding
+ }
readonly property alias font: label.font
readonly property alias foregroundColor: label.color
diff --git a/src/controls/Styles/Android/drawables/DrawableLoader.qml b/src/controls/Styles/Android/drawables/DrawableLoader.qml
index e2d2873b..bd525253 100644
--- a/src/controls/Styles/Android/drawables/DrawableLoader.qml
+++ b/src/controls/Styles/Android/drawables/DrawableLoader.qml
@@ -37,6 +37,7 @@
**
****************************************************************************/
+import QtQml 2.14 as Qml
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0
@@ -85,17 +86,82 @@ Loader {
type === "rotate" ? Qt.createComponent("RotateDrawable.qml") :
type === "stateslist" ? Qt.createComponent("StateDrawable.qml") : null
- Binding { target: loader.item; property: "styleDef"; value: loader.styleDef }
- Binding { target: loader.item; property: "focused"; value: loader.focused }
- Binding { target: loader.item; property: "pressed"; value: loader.pressed }
- Binding { target: loader.item; property: "checked"; value: loader.checked }
- Binding { target: loader.item; property: "selected"; value: loader.selected }
- Binding { target: loader.item; property: "accelerated"; value: loader.accelerated }
- Binding { target: loader.item; property: "window_focused"; value: loader.window_focused }
- Binding { target: loader.item; property: "level"; value: loader.level }
- Binding { target: loader.item; property: "levelId"; value: loader.levelId }
- Binding { target: loader.item; property: "orientations"; value: loader.orientations }
- Binding { target: loader.item; property: "duration"; value: loader.duration }
- Binding { target: loader.item; property: "excludes"; value: loader.excludes }
- Binding { target: loader.item; property: "clippables"; value: loader.clippables }
+ Qml.Binding {
+ target: loader.item
+ property: "styleDef"
+ value: loader.styleDef
+ restoreMode: Binding.RestoreBinding
+ }
+ Qml.Binding {
+ target: loader.item
+ property: "focused"
+ value: loader.focused
+ restoreMode: Binding.RestoreBinding
+ }
+ Qml.Binding {
+ target: loader.item
+ property: "pressed"
+ value: loader.pressed
+ restoreMode: Binding.RestoreBinding
+ }
+ Qml.Binding {
+ target: loader.item
+ property: "checked"
+ value: loader.checked
+ restoreMode: Binding.RestoreBinding
+ }
+ Qml.Binding {
+ target: loader.item
+ property: "selected"
+ value: loader.selected
+ restoreMode: Binding.RestoreBinding
+ }
+ Qml.Binding {
+ target: loader.item
+ property: "accelerated"
+ value: loader.accelerated
+ restoreMode: Binding.RestoreBinding
+ }
+ Qml.Binding {
+ target: loader.item
+ property: "window_focused"
+ value: loader.window_focused
+ restoreMode: Binding.RestoreBinding
+ }
+ Qml.Binding {
+ target: loader.item
+ property: "level"
+ value: loader.level
+ restoreMode: Binding.RestoreBinding
+ }
+ Qml.Binding {
+ target: loader.item
+ property: "levelId"
+ value: loader.levelId
+ restoreMode: Binding.RestoreBinding
+ }
+ Qml.Binding {
+ target: loader.item
+ property: "orientations"
+ value: loader.orientations
+ restoreMode: Binding.RestoreBinding
+ }
+ Qml.Binding {
+ target: loader.item
+ property: "duration"
+ value: loader.duration
+ restoreMode: Binding.RestoreBinding
+ }
+ Qml.Binding {
+ target: loader.item
+ property: "excludes"
+ value: loader.excludes
+ restoreMode: Binding.RestoreBinding
+ }
+ Qml.Binding {
+ target: loader.item
+ property: "clippables"
+ value: loader.clippables
+ restoreMode: Binding.RestoreBinding
+ }
}
diff --git a/src/controls/Styles/Desktop/MenuStyle.qml b/src/controls/Styles/Desktop/MenuStyle.qml
index 953f6a32..282860ae 100644
--- a/src/controls/Styles/Desktop/MenuStyle.qml
+++ b/src/controls/Styles/Desktop/MenuStyle.qml
@@ -37,6 +37,7 @@
**
****************************************************************************/
+import QtQml 2.14 as Qml
import QtQuick 2.2
import QtQuick.Window 2.1
import QtQuick.Controls 1.2
@@ -78,10 +79,11 @@ Style {
// ### The Screen attached property can only be set on an Item,
// ### and will get its values only when put on a Window.
readonly property int desktopAvailableHeight: Screen.desktopAvailableHeight
- Binding {
+ Qml.Binding {
target: styleRoot
property: "__maxPopupHeight"
value: desktopAvailableHeight * 0.99
+ restoreMode: Binding.RestoreBinding
}
}
diff --git a/src/dialogs/DefaultFileDialog.qml b/src/dialogs/DefaultFileDialog.qml
index da273fc9..077b5acd 100644
--- a/src/dialogs/DefaultFileDialog.qml
+++ b/src/dialogs/DefaultFileDialog.qml
@@ -37,6 +37,7 @@
**
****************************************************************************/
+import QtQml 2.14 as Qml
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Private 1.0 as ControlsPrivate
@@ -153,15 +154,17 @@ AbstractFileDialog {
implicitHeight: Math.min(root.__maximumDimension, Screen.pixelDensity * 80)
color: root.palette.window
- Binding {
+ Qml.Binding {
target: view.model
property: "folder"
value: root.folder
+ restoreMode: Binding.RestoreBinding
}
- Binding {
+ Qml.Binding {
target: currentPathField
property: "text"
value: root.urlToPath(root.folder)
+ restoreMode: Binding.RestoreBinding
}
Keys.onPressed: {
event.accepted = true
diff --git a/src/extras/DelayButton.qml b/src/extras/DelayButton.qml
index 6bace4ed..9a0c3a25 100644
--- a/src/extras/DelayButton.qml
+++ b/src/extras/DelayButton.qml
@@ -37,6 +37,7 @@
**
****************************************************************************/
+import QtQml 2.14 as Qml
import QtQuick 2.2
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
@@ -112,11 +113,12 @@ Button {
}
}
- Binding {
+ Qml.Binding {
// Force checkable to false to get full control over the checked -property
target: root
property: "checkable"
value: false
+ restoreMode: Binding.RestoreBinding
}
onProgressChanged: {
diff --git a/src/extras/Styles/Flat/ApplicationWindowStyle.qml b/src/extras/Styles/Flat/ApplicationWindowStyle.qml
index f4fbd24a..222c9f7c 100644
--- a/src/extras/Styles/Flat/ApplicationWindowStyle.qml
+++ b/src/extras/Styles/Flat/ApplicationWindowStyle.qml
@@ -36,7 +36,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-import QtQuick 2.2
+import QtQuick 2.14
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.4 as Base
import QtQuick.Controls.Styles.Flat 1.0
@@ -103,12 +103,13 @@ Base.ApplicationWindowStyle {
items: control.menuBar ? control.menuBar.menus : []
}
- Binding {
+ Qml.Binding {
target: control.toolBar
property: "__menu"
value: proxyMenu.items.length > 1 ? proxyMenu :
proxyMenu.items.length === 1 ? proxyMenu.items[0] : null
when: hasToolBar
+ restoreMode: Binding.RestoreBinding
}
}
}
diff --git a/src/extras/Styles/Flat/GroupBoxStyle.qml b/src/extras/Styles/Flat/GroupBoxStyle.qml
index c932262b..797086a2 100644
--- a/src/extras/Styles/Flat/GroupBoxStyle.qml
+++ b/src/extras/Styles/Flat/GroupBoxStyle.qml
@@ -36,6 +36,8 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+
+import QtQml 2.14 as Qml
import QtQuick 2.2
import QtQuick.Controls.Private 1.0 as Private
import QtQuick.Controls.Styles.Flat 1.0
@@ -67,10 +69,11 @@ Private.GroupBoxStyle {
}
// TODO:
- Binding {
+ Qml.Binding {
target: root.padding
property: "top"
value: background.anchors.topMargin + root.spacing
+ restoreMode: Binding.RestoreBinding
}
CheckBoxDrawer {
diff --git a/src/extras/Tumbler.qml b/src/extras/Tumbler.qml
index 299ac83e..a6208708 100644
--- a/src/extras/Tumbler.qml
+++ b/src/extras/Tumbler.qml
@@ -37,6 +37,7 @@
**
****************************************************************************/
+import QtQml 2.14 as Qml
import QtQuick 2.2
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
@@ -330,10 +331,11 @@ Control {
visible: columnObject.visible
clip: true
- Binding {
+ Qml.Binding {
target: columnObject
property: "__currentIndex"
value: columnPathView.currentIndex
+ restoreMode: Binding.RestoreBinding
}
// We add one here so that the delegate's don't just appear in the view instantly,
diff --git a/tests/auto/controls/data/toolbutton/tb_checkableActionWithinExclusiveGroup.qml b/tests/auto/controls/data/toolbutton/tb_checkableActionWithinExclusiveGroup.qml
index 59127155..7c9ebeac 100644
--- a/tests/auto/controls/data/toolbutton/tb_checkableActionWithinExclusiveGroup.qml
+++ b/tests/auto/controls/data/toolbutton/tb_checkableActionWithinExclusiveGroup.qml
@@ -48,6 +48,7 @@
**
****************************************************************************/
+import QtQml 2.14 as Qml
import QtQuick 2.2
import QtQuick.Controls 1.2
@@ -75,15 +76,17 @@ Row {
checked: textinput.font.underline
}
}
- Binding {
+ Qml.Binding {
target: textinput
property: "font.bold"
value: bold.checked
+ restoreMode: Binding.RestoreBinding
}
- Binding {
+ Qml.Binding {
target: textinput
property: "font.underline"
value: underline.checked
+ restoreMode: Binding.RestoreBinding
}
ToolButton {
id: _tb1