aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-04-06 03:02:35 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-04-06 03:02:35 +0200
commit9001812730bccd4ee5153ad47aa130b230c27d78 (patch)
treec4b3e07ddbfbe8dc09f95dc7cf7afc13698e9efb
parentd9b0e2cde72824d19fb8ef6dfffd8cceb53957a3 (diff)
parentbb4b463c93623635154749e200304d8210b88bda (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13v5.13.0-beta2
-rw-r--r--src/imports/controls/ComboBox.qml3
-rw-r--r--src/imports/controls/ItemDelegate.qml2
-rw-r--r--src/imports/controls/doc/qtquickcontrols.qdocconf1
-rw-r--r--src/imports/controls/qquickdefaulttheme.cpp2
-rw-r--r--src/quicktemplates2/qquickscrollbar.cpp2
-rw-r--r--tests/auto/controls/data/tst_dialogbuttonbox.qml55
-rw-r--r--tests/auto/controls/data/tst_tumbler.qml2
-rw-r--r--tests/auto/sanity/tst_sanity.cpp2
8 files changed, 31 insertions, 38 deletions
diff --git a/src/imports/controls/ComboBox.qml b/src/imports/controls/ComboBox.qml
index 69156114..3bca9c02 100644
--- a/src/imports/controls/ComboBox.qml
+++ b/src/imports/controls/ComboBox.qml
@@ -55,7 +55,8 @@ T.ComboBox {
delegate: ItemDelegate {
width: parent.width
text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData
- palette.text: control.highlightedIndex === index ? control.palette.highlightedText : control.palette.text
+ palette.text: control.palette.text
+ palette.highlightedText: control.palette.highlightedText
font.weight: control.currentIndex === index ? Font.DemiBold : Font.Normal
highlighted: control.highlightedIndex === index
hoverEnabled: control.hoverEnabled
diff --git a/src/imports/controls/ItemDelegate.qml b/src/imports/controls/ItemDelegate.qml
index 8cc12cab..6229e2bb 100644
--- a/src/imports/controls/ItemDelegate.qml
+++ b/src/imports/controls/ItemDelegate.qml
@@ -64,7 +64,7 @@ T.ItemDelegate {
icon: control.icon
text: control.text
font: control.font
- color: control.palette.text
+ color: control.highlighted ? control.palette.highlightedText : control.palette.text
}
background: Rectangle {
diff --git a/src/imports/controls/doc/qtquickcontrols.qdocconf b/src/imports/controls/doc/qtquickcontrols.qdocconf
index 9536b428..2a01d058 100644
--- a/src/imports/controls/doc/qtquickcontrols.qdocconf
+++ b/src/imports/controls/doc/qtquickcontrols.qdocconf
@@ -6,6 +6,7 @@ description = Qt Quick Controls Reference Documentation
version = $QT_VERSION
qhp.projects = QtQuickControls
+moduleheader = QtQuickControls2
qhp.QtQuickControls.file = qtquickcontrols.qhp
qhp.QtQuickControls.namespace = org.qt-project.qtquickcontrols.$QT_VERSION_TAG
diff --git a/src/imports/controls/qquickdefaulttheme.cpp b/src/imports/controls/qquickdefaulttheme.cpp
index bc292c2f..26fb2a2f 100644
--- a/src/imports/controls/qquickdefaulttheme.cpp
+++ b/src/imports/controls/qquickdefaulttheme.cpp
@@ -60,7 +60,7 @@ void QQuickDefaultTheme::initialize(QQuickTheme *theme)
systemPalette.setColor(QPalette::Highlight, QColor::fromRgba(0xFF0066FF));
systemPalette.setColor(QPalette::Disabled, QPalette::Highlight, QColor::fromRgba(0xFFF0F6FF));
- systemPalette.setColor(QPalette::HighlightedText, QColor::fromRgba(0xFFFFFFFF));
+ systemPalette.setColor(QPalette::HighlightedText, QColor::fromRgba(0xFF090909));
systemPalette.setColor(QPalette::Light, QColor::fromRgba(0xFFF6F6F6));
diff --git a/src/quicktemplates2/qquickscrollbar.cpp b/src/quicktemplates2/qquickscrollbar.cpp
index 9e6fe684..52daa27f 100644
--- a/src/quicktemplates2/qquickscrollbar.cpp
+++ b/src/quicktemplates2/qquickscrollbar.cpp
@@ -129,7 +129,7 @@ QT_BEGIN_NAMESPACE
It is possible to create an instance of ScrollBar without using the
attached property API. This is useful when the behavior of the attached
- scoll bar is not sufficient or a \l Flickable is not in use. In the
+ scroll bar is not sufficient or a \l Flickable is not in use. In the
following example, horizontal and vertical scroll bars are used to
scroll over the text without using \l Flickable:
diff --git a/tests/auto/controls/data/tst_dialogbuttonbox.qml b/tests/auto/controls/data/tst_dialogbuttonbox.qml
index 374b32ff..a651713a 100644
--- a/tests/auto/controls/data/tst_dialogbuttonbox.qml
+++ b/tests/auto/controls/data/tst_dialogbuttonbox.qml
@@ -288,9 +288,12 @@ TestCase {
verify(button)
// The button should never go outside of the box.
- var buttonPosInBox = button.mapToItem(control, 0, 0)
- verify(buttonPosInBox.x >= 0)
- verify(buttonPosInBox.x + button.width < control.width)
+ tryVerify(function() { return button.mapToItem(control, 0, 0).x >= 0 },
+ 1000, "Expected left edge of button to be within left edge of DialogButtonBox (i.e. greater than or equal to 0)" +
+ ", but it's " + button.mapToItem(control, 0, 0).x)
+ tryVerify(function() { return button.mapToItem(control, 0, 0).x + button.width <= control.width },
+ 1000, "Expected right edge of button to be within right edge of DialogButtonBox (i.e. less than or equal to " +
+ control.width + "), but it's " + (button.mapToItem(control, 0, 0).x + button.width))
}
Component {
@@ -333,11 +336,12 @@ TestCase {
verify(button)
// The button should never go outside of the box.
- var buttonPosInBox = button.mapToItem(box, 0, 0)
- verify(buttonPosInBox.x >= 0, "Expected button to be inside left edge "
- + "of DialogButtonBox, but it's " + buttonPosInBox.x)
- verify(buttonPosInBox.x + button.width <= box.width, "Expected button to be inside right edge "
- + "of DialogButtonBox (" + box.width + "), but it's " + (buttonPosInBox.x + button.width))
+ tryVerify(function() { return button.mapToItem(box, 0, 0).x >= 0 },
+ 1000, "Expected left edge of button to be within left edge of DialogButtonBox (i.e. greater than or equal to 0)" +
+ ", but it's " + button.mapToItem(box, 0, 0).x)
+ tryVerify(function() { return button.mapToItem(box, 0, 0).x + button.width <= box.width },
+ 1000, "Expected right edge of button to be within right edge of DialogButtonBox (i.e. less than or equal to " +
+ box.width + "), but it's " + (button.mapToItem(box, 0, 0).x + button.width))
compare(box.width, dialog.width)
// There's a single button and we align it to the right.
compare(box.contentItem.width, button.width)
@@ -362,27 +366,6 @@ TestCase {
}
}
- // QTBUG-72886
- function test_oneCustomButtonChangeText() {
- var control = createTemporaryObject(customButtonBox, testCase, {})
- verify(control)
-
- var listView = control.contentItem
- waitForRendering(listView)
-
- var button = control.okButton
- verify(button)
- button.text = "some longer text";
-
- // The button should never go outside of the box.
- tryVerify(function() { return button.mapToItem(control, 0, 0).x >= 0 },
- 1000, "Expected left edge of button to be within left edge of DialogButtonBox (i.e. greater than or equal to 0)" +
- ", but it's " + button.mapToItem(control, 0, 0).x)
- tryVerify(function() { return button.mapToItem(control, 0, 0).x + button.width <= control.width },
- 1000, "Expected right edge of button to be within right edge of DialogButtonBox (i.e. less than or equal to " +
- control.width + "), but it's " + (button.mapToItem(control, 0, 0).x + button.width))
- }
-
Component {
id: customButtonBoxTwoButtons
@@ -406,16 +389,25 @@ TestCase {
}
}
+ function test_changeCustomButtonText_data() {
+ return [
+ { tag: "oneButton", component: customButtonBox },
+ { tag: "twoButtons", component: customButtonBoxTwoButtons },
+ ]
+ }
+
// QTBUG-72886
- function test_twoCustomButtonsChangeText() {
- var control = createTemporaryObject(customButtonBoxTwoButtons, testCase, {})
+ function test_changeCustomButtonText(data) {
+ var control = createTemporaryObject(customButtonBox, testCase, {})
verify(control)
var listView = control.contentItem
waitForRendering(listView)
var button = control.okButton
+ verify(button)
button.text = "some longer text";
+
// The button should never go outside of the box.
tryVerify(function() { return button.mapToItem(control, 0, 0).x >= 0 },
1000, "Expected left edge of button to be within left edge of DialogButtonBox (i.e. greater than or equal to 0)" +
@@ -425,7 +417,6 @@ TestCase {
control.width + "), but it's " + (button.mapToItem(control, 0, 0).x + button.width))
}
-
Component {
id: noRolesDialog
diff --git a/tests/auto/controls/data/tst_tumbler.qml b/tests/auto/controls/data/tst_tumbler.qml
index 7c2095f8..c9cc10d7 100644
--- a/tests/auto/controls/data/tst_tumbler.qml
+++ b/tests/auto/controls/data/tst_tumbler.qml
@@ -357,12 +357,12 @@ TestCase {
tumbler.forceActiveFocus();
keyClick(Qt.Key_Down);
tryCompare(tumblerView, "offset", 3.0);
+ tryCompare(tumbler, "moving", false);
firstItemCenterPos = itemCenterPos(0);
firstItem = tumblerView.itemAt(firstItemCenterPos.x, firstItemCenterPos.y);
verify(firstItem);
// Test QTBUG-40298.
actualPos = testCase.mapFromItem(firstItem, 0, 0);
- tryCompare(tumbler, "moving", false);
fuzzyCompare(actualPos.x, tumbler.leftPadding, 0.0001);
fuzzyCompare(actualPos.y, tumbler.topPadding, 0.0001);
diff --git a/tests/auto/sanity/tst_sanity.cpp b/tests/auto/sanity/tst_sanity.cpp
index d2d962bc..62a1f574 100644
--- a/tests/auto/sanity/tst_sanity.cpp
+++ b/tests/auto/sanity/tst_sanity.cpp
@@ -137,7 +137,7 @@ protected:
m_errors += QString("%1:%2 : %3").arg(m_fileName).arg(node->firstSourceLocation().startLine).arg(error);
}
- void throwRecursionDepthError()
+ void throwRecursionDepthError() final
{
m_errors += QString::fromLatin1("%1: Maximum statement or expression depth exceeded")
.arg(m_fileName);