diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-03-09 03:03:23 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-03-09 03:03:23 +0100 |
commit | 490b0f38b64735230228b304f956a4c63c8a0895 (patch) | |
tree | 7ae6b863cb66fca441da920c249c22704e7de197 | |
parent | f984a80d055e4c9bbd2224d0db54f4233838591b (diff) | |
parent | d8e0a208c9b2c28354da0fa9fc4a8e8d3131cbc2 (diff) | |
download | qtquickcontrols-490b0f38b64735230228b304f956a4c63c8a0895.tar.gz |
Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I038d33b06fe8e50da17262b9326975bc1f9bc747
-rw-r--r-- | dist/changes-5.12.1 | 27 | ||||
-rw-r--r-- | src/controls/Private/BasicTableView.qml | 4 | ||||
-rw-r--r-- | src/controls/Private/CalendarHeaderModel.qml | 7 | ||||
-rw-r--r-- | src/controls/Styles/Base/CalendarStyle.qml | 1 | ||||
-rw-r--r-- | src/controls/Styles/Base/ProgressBarStyle.qml | 3 | ||||
-rw-r--r-- | tests/auto/controls/data/tst_calendar.qml | 8 | ||||
-rw-r--r-- | tests/shared/qt_quick_controls_quicktest.h | 1 |
7 files changed, 45 insertions, 6 deletions
diff --git a/dist/changes-5.12.1 b/dist/changes-5.12.1 new file mode 100644 index 00000000..ac729cbf --- /dev/null +++ b/dist/changes-5.12.1 @@ -0,0 +1,27 @@ +Qt 5.12.1 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.12.0. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +http://doc.qt.io/qt-5/index.html + +The Qt version 5.12 series is binary compatible with the 5.11.x series. +Applications compiled for 5.11 will continue to run with 5.12. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Controls * +**************************************************************************** + + - QQuickTreeModelAdaptor1: + * Fixed an issue where an invalid access was done if either extended or + multiple selection was in use and the mouse went out of the view on + top of the model. diff --git a/src/controls/Private/BasicTableView.qml b/src/controls/Private/BasicTableView.qml index c701883b..bc044eeb 100644 --- a/src/controls/Private/BasicTableView.qml +++ b/src/controls/Private/BasicTableView.qml @@ -421,9 +421,9 @@ ScrollView { interactive: Settings.hasTouchScreen property var rowItemStack: [] // Used as a cache for rowDelegates - readonly property bool transientScrollbars: __style && !!__style.transientScrollBars + readonly property bool transientScrollBars: __style && !!__style.transientScrollBars readonly property real vScrollbarPadding: __scroller.verticalScrollBar.visible - && !transientScrollbars && Qt.platform.os === "osx" ? + && !transientScrollBars && Qt.platform.os === "osx" ? __verticalScrollBar.width + __scroller.scrollBarSpacing + root.__style.padding.right : 0 Binding { diff --git a/src/controls/Private/CalendarHeaderModel.qml b/src/controls/Private/CalendarHeaderModel.qml index b978dbdc..40328a8b 100644 --- a/src/controls/Private/CalendarHeaderModel.qml +++ b/src/controls/Private/CalendarHeaderModel.qml @@ -89,7 +89,10 @@ ListModel { dayOfWeek: Locale.Saturday } - Component.onCompleted: { + Component.onCompleted: updateFirstDayOfWeek() + onLocaleChanged: updateFirstDayOfWeek() + + function updateFirstDayOfWeek() { var daysOfWeek = [Locale.Sunday, Locale.Monday, Locale.Tuesday, Locale.Wednesday, Locale.Thursday, Locale.Friday, Locale.Saturday]; var firstDayOfWeek = root.locale.firstDayOfWeek; @@ -97,7 +100,7 @@ ListModel { var shifted = daysOfWeek.splice(firstDayOfWeek, daysOfWeek.length - firstDayOfWeek); daysOfWeek = shifted.concat(daysOfWeek) - if (firstDayOfWeek !== Locale.Sunday) { + if (firstDayOfWeek !== root.get(0).dayOfWeek) { for (var i = 0; i < daysOfWeek.length; ++i) { root.setProperty(i, "dayOfWeek", daysOfWeek[i]); } diff --git a/src/controls/Styles/Base/CalendarStyle.qml b/src/controls/Styles/Base/CalendarStyle.qml index 20459274..ef0cb779 100644 --- a/src/controls/Styles/Base/CalendarStyle.qml +++ b/src/controls/Styles/Base/CalendarStyle.qml @@ -410,6 +410,7 @@ Style { anchors.leftMargin: (control.weekNumbersVisible ? weekNumbersItem.width : 0) anchors.right: parent.right spacing: gridVisible ? __gridLineWidth : 0 + property alias __repeater: repeater Repeater { id: repeater diff --git a/src/controls/Styles/Base/ProgressBarStyle.qml b/src/controls/Styles/Base/ProgressBarStyle.qml index b65c0f40..d51e056d 100644 --- a/src/controls/Styles/Base/ProgressBarStyle.qml +++ b/src/controls/Styles/Base/ProgressBarStyle.qml @@ -134,8 +134,7 @@ Style { clip: true Rectangle { id: base - width: control.width - height: control.height + anchors.fill: parent radius: TextSingleton.implicitHeight * 0.16 antialiasing: true gradient: Gradient { diff --git a/tests/auto/controls/data/tst_calendar.qml b/tests/auto/controls/data/tst_calendar.qml index 1f8d9a8d..08bd756d 100644 --- a/tests/auto/controls/data/tst_calendar.qml +++ b/tests/auto/controls/data/tst_calendar.qml @@ -985,5 +985,13 @@ Item { compare(testcase.aysncDelegatesDestructed[i], true); } } + + function test_firstDayOfWeekAfterLocaleChange() { + calendar.selectedDate = new Date(2013, 0, 1); + calendar.locale = Qt.locale("en"); + compare(calendar.__panel.dayOfWeekHeaderRow.__repeater.model.get(0).dayOfWeek, 0) + calendar.locale = Qt.locale("fr"); + compare(calendar.__panel.dayOfWeekHeaderRow.__repeater.model.get(0).dayOfWeek, 1) + } } } diff --git a/tests/shared/qt_quick_controls_quicktest.h b/tests/shared/qt_quick_controls_quicktest.h index bf6c6559..b12cfc76 100644 --- a/tests/shared/qt_quick_controls_quicktest.h +++ b/tests/shared/qt_quick_controls_quicktest.h @@ -43,6 +43,7 @@ QT_BEGIN_NAMESPACE #define QT_QUICK_CONTROLS_TEST_MAIN(name) \ int main(int argc, char **argv) \ { \ + QTEST_SET_MAIN_SOURCE_PATH \ QtQuickControlsTestApp* app = 0; \ if (!QCoreApplication::instance()) \ app = new QtQuickControlsTestApp(argc, argv); \ |