From 69f71318db48616d51c8f81715e794b483c1fbfa Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 10 Jan 2018 10:36:26 +0100 Subject: Document licenses Every module should state the licenses it is available under in it's landing page. Change-Id: Ib2d5f49e57f7f34bf06a558725dcb53152561f8d Reviewed-by: Leena Miettinen --- src/controls/doc/src/qtquickcontrols-index.qdoc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/controls') diff --git a/src/controls/doc/src/qtquickcontrols-index.qdoc b/src/controls/doc/src/qtquickcontrols-index.qdoc index 63753ae1..28bc3644 100644 --- a/src/controls/doc/src/qtquickcontrols-index.qdoc +++ b/src/controls/doc/src/qtquickcontrols-index.qdoc @@ -54,6 +54,15 @@ Types that can be used to build menus. \annotatedlist menus + \section1 Licenses and Attributions + + The Qt Quick Controls module is available under commercial licenses from \l{The Qt Company}. + In addition, it is available under free software licenses. Since Qt 5.4, + these free software licenses are + \l{GNU Lesser General Public License, version 3}, or + the \l{GNU General Public License, version 2}. + See \l{Qt Licensing} for further details. + \section1 Related information \list -- cgit v1.2.1 From 9dc39b7f0610990dabf9f8544ca64ff5175e7c77 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Fri, 9 Feb 2018 12:59:42 +0100 Subject: Calendar: make clicked(date) emit the correct date Calendar was implemented in such a way that pressing on a date selects that date, rather than releasing or clicking. With the current code, this presents issues when the month changes as a result of the press. For example, clicking on a date in an adjacent month will result in the clicked() signal passing the date under the mouse in the new month, instead of the originally pressed date. This patches fixes the issue by storing the pressed date and using it when emitting the released() and clicked() signals. Task-number: QTBUG-54129 Change-Id: I0c16293033b77f6ae783b5365d198b4a516af90b Reviewed-by: J-P Nurmi --- src/controls/Styles/Base/CalendarStyle.qml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/controls') diff --git a/src/controls/Styles/Base/CalendarStyle.qml b/src/controls/Styles/Base/CalendarStyle.qml index d1b172e0..9da43ce5 100644 --- a/src/controls/Styles/Base/CalendarStyle.qml +++ b/src/controls/Styles/Base/CalendarStyle.qml @@ -369,6 +369,7 @@ Style { property int hoveredCellIndex: -1 property int pressedCellIndex: -1 property int pressCellIndex: -1 + property var pressDate: null Rectangle { anchors.fill: parent @@ -581,9 +582,11 @@ Style { onPressed: { pressCellIndex = cellIndexAt(mouse.x, mouse.y); + pressDate = null; if (pressCellIndex !== -1) { var date = view.model.dateAt(pressCellIndex); pressedCellIndex = pressCellIndex; + pressDate = date; if (__isValidDate(date)) { control.selectedDate = date; control.pressed(date); @@ -608,9 +611,8 @@ Style { onClicked: { var indexOfCell = cellIndexAt(mouse.x, mouse.y); if (indexOfCell !== -1 && indexOfCell === pressCellIndex) { - var date = view.model.dateAt(indexOfCell); - if (__isValidDate(date)) - control.clicked(date); + if (__isValidDate(pressDate)) + control.clicked(pressDate); } } -- cgit v1.2.1