aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2020-01-31 13:37:30 +0100
committerMitch Curtis <mitch.curtis@qt.io>2020-03-23 14:01:37 +0100
commit67792feba0bc39cd79d789a45978436b09fd4adf (patch)
tree5945ae9ce2b7f36b00e729a1e81d44b4ae1be66f
parentf37bb43758bc19604743ac1d5fdf8d85236b6470 (diff)
Fix Qt 6 to-do comments in QML files
Remove what appears to be code for backwards compatibility in the sizing of certain controls. Removing the code shows no discernible difference in the appearance of those controls. [ChangeLog][Controls][Tumbler] implicitWidth and implicitHeight must now be provided for Tumbler's contentItem, as with all other controls. Change-Id: Id858b6d13bfd81d8f30be57290fb260404652a4c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
-rw-r--r--src/imports/controls/Dial.qml4
-rw-r--r--src/imports/controls/Tumbler.qml4
-rw-r--r--src/imports/controls/fusion/Dial.qml4
-rw-r--r--src/imports/controls/fusion/Tumbler.qml4
-rw-r--r--src/imports/controls/imagine/Tumbler.qml4
-rw-r--r--src/imports/controls/material/Dial.qml4
-rw-r--r--src/imports/controls/material/Tumbler.qml4
-rw-r--r--src/imports/controls/universal/Dial.qml4
-rw-r--r--src/imports/controls/universal/Tumbler.qml4
-rw-r--r--tests/auto/controls/data/TumblerListView.qml3
-rw-r--r--tests/auto/controls/data/TumblerPathView.qml2
11 files changed, 22 insertions, 19 deletions
diff --git a/src/imports/controls/Dial.qml b/src/imports/controls/Dial.qml
index cc4618a5..2fed1bca 100644
--- a/src/imports/controls/Dial.qml
+++ b/src/imports/controls/Dial.qml
@@ -43,9 +43,9 @@ T.Dial {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
- implicitContentWidth + leftPadding + rightPadding) || 184 // ### remove 184 in Qt 6
+ implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
- implicitContentHeight + topPadding + bottomPadding) || 184 // ### remove 184 in Qt 6
+ implicitContentHeight + topPadding + bottomPadding)
background: DialImpl {
implicitWidth: 184
diff --git a/src/imports/controls/Tumbler.qml b/src/imports/controls/Tumbler.qml
index cd10263b..4d1abdd3 100644
--- a/src/imports/controls/Tumbler.qml
+++ b/src/imports/controls/Tumbler.qml
@@ -43,9 +43,9 @@ T.Tumbler {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
- implicitContentWidth + leftPadding + rightPadding) || 60 // ### remove 60 in Qt 6
+ implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
- implicitContentHeight + topPadding + bottomPadding) || 200 // ### remove 200 in Qt 6
+ implicitContentHeight + topPadding + bottomPadding)
delegate: Text {
text: modelData
diff --git a/src/imports/controls/fusion/Dial.qml b/src/imports/controls/fusion/Dial.qml
index 796610b5..bf8021e5 100644
--- a/src/imports/controls/fusion/Dial.qml
+++ b/src/imports/controls/fusion/Dial.qml
@@ -45,9 +45,9 @@ T.Dial {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
- implicitContentWidth + leftPadding + rightPadding) || 100 // ### remove 100 in Qt 6
+ implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
- implicitContentHeight + topPadding + bottomPadding) || 100 // ### remove 100 in Qt 6
+ implicitContentHeight + topPadding + bottomPadding)
background: DialImpl {
implicitWidth: 100
diff --git a/src/imports/controls/fusion/Tumbler.qml b/src/imports/controls/fusion/Tumbler.qml
index 0129f06c..c26bd145 100644
--- a/src/imports/controls/fusion/Tumbler.qml
+++ b/src/imports/controls/fusion/Tumbler.qml
@@ -45,9 +45,9 @@ T.Tumbler {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
- implicitContentWidth + leftPadding + rightPadding) || 60 // ### remove 60 in Qt 6
+ implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
- implicitContentHeight + topPadding + bottomPadding) || 200 // ### remove 200 in Qt 6
+ implicitContentHeight + topPadding + bottomPadding)
delegate: Text {
text: modelData
diff --git a/src/imports/controls/imagine/Tumbler.qml b/src/imports/controls/imagine/Tumbler.qml
index 12025cc5..b53b6265 100644
--- a/src/imports/controls/imagine/Tumbler.qml
+++ b/src/imports/controls/imagine/Tumbler.qml
@@ -45,9 +45,9 @@ T.Tumbler {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
- implicitContentWidth + leftPadding + rightPadding) || 60 // ### remove 60 in Qt 6
+ implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
- implicitContentHeight + topPadding + bottomPadding) || 200 // ### remove 200 in Qt 6
+ implicitContentHeight + topPadding + bottomPadding)
topInset: background ? -background.topInset || 0 : 0
leftInset: background ? -background.leftInset || 0 : 0
diff --git a/src/imports/controls/material/Dial.qml b/src/imports/controls/material/Dial.qml
index 1f80a7fe..706261fc 100644
--- a/src/imports/controls/material/Dial.qml
+++ b/src/imports/controls/material/Dial.qml
@@ -43,9 +43,9 @@ T.Dial {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
- implicitContentWidth + leftPadding + rightPadding) || 100 // ### remove 100 in Qt 6
+ implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
- implicitContentHeight + topPadding + bottomPadding) || 100 // ### remove 100 in Qt 6
+ implicitContentHeight + topPadding + bottomPadding)
background: Rectangle {
implicitWidth: 100
diff --git a/src/imports/controls/material/Tumbler.qml b/src/imports/controls/material/Tumbler.qml
index 30d66c58..973b4a68 100644
--- a/src/imports/controls/material/Tumbler.qml
+++ b/src/imports/controls/material/Tumbler.qml
@@ -44,9 +44,9 @@ T.Tumbler {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
- implicitContentWidth + leftPadding + rightPadding) || 60 // ### remove 60 in Qt 6
+ implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
- implicitContentHeight + topPadding + bottomPadding) || 200 // ### remove 200 in Qt 6
+ implicitContentHeight + topPadding + bottomPadding)
delegate: Text {
text: modelData
diff --git a/src/imports/controls/universal/Dial.qml b/src/imports/controls/universal/Dial.qml
index f45d912e..001c5a55 100644
--- a/src/imports/controls/universal/Dial.qml
+++ b/src/imports/controls/universal/Dial.qml
@@ -42,9 +42,9 @@ T.Dial {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
- implicitContentWidth + leftPadding + rightPadding) || 100 // ### remove 100 in Qt 6
+ implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
- implicitContentHeight + topPadding + bottomPadding) || 100 // ### remove 100 in Qt 6
+ implicitContentHeight + topPadding + bottomPadding)
background: Rectangle {
implicitWidth: 100
diff --git a/src/imports/controls/universal/Tumbler.qml b/src/imports/controls/universal/Tumbler.qml
index d0e7b12f..ebbc746d 100644
--- a/src/imports/controls/universal/Tumbler.qml
+++ b/src/imports/controls/universal/Tumbler.qml
@@ -44,9 +44,9 @@ T.Tumbler {
id: control
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
- implicitContentWidth + leftPadding + rightPadding) || 60 // ### remove 60 in Qt 6
+ implicitContentWidth + leftPadding + rightPadding)
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
- implicitContentHeight + topPadding + bottomPadding) || 200 // ### remove 200 in Qt 6
+ implicitContentHeight + topPadding + bottomPadding)
delegate: Text {
text: modelData
diff --git a/tests/auto/controls/data/TumblerListView.qml b/tests/auto/controls/data/TumblerListView.qml
index affaa6cd..33504f33 100644
--- a/tests/auto/controls/data/TumblerListView.qml
+++ b/tests/auto/controls/data/TumblerListView.qml
@@ -52,7 +52,8 @@ import QtQuick 2.12
import QtQuick.Controls 2.12
ListView {
- anchors.fill: parent
+ implicitWidth: 60
+ implicitHeight: 200
snapMode: ListView.SnapToItem
highlightRangeMode: ListView.StrictlyEnforceRange
preferredHighlightBegin: height / 2 - (height / parent.visibleItemCount / 2)
diff --git a/tests/auto/controls/data/TumblerPathView.qml b/tests/auto/controls/data/TumblerPathView.qml
index 8ea86eae..ec0d73ef 100644
--- a/tests/auto/controls/data/TumblerPathView.qml
+++ b/tests/auto/controls/data/TumblerPathView.qml
@@ -53,6 +53,8 @@ import QtQuick.Controls 2.12
PathView {
id: pathView
+ implicitWidth: 60
+ implicitHeight: 200
clip: true
pathItemCount: parent.visibleItemCount + 1
preferredHighlightBegin: 0.5