diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-09-06 13:31:44 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-09-06 13:31:45 +0200 |
commit | 3703d57161dc4ad7df000403bfcc43ac78eb6617 (patch) | |
tree | 4ab8ca921336f38ca539b699c6f4c0d7dc3de949 /src/quicktemplates2 | |
parent | 94fdd09199b3373bc6d6e9d9c873cd16d54184a5 (diff) | |
parent | 567a5cf69ef39ba5e9d0558ee7d6caec4d69bf71 (diff) |
Merge remote-tracking branch 'origin/5.13' into 5.14
Change-Id: Ie9314e1a5daa20cee9d95a3c42873dbe515b3333
Diffstat (limited to 'src/quicktemplates2')
-rw-r--r-- | src/quicktemplates2/qquickabstractbutton.cpp | 2 | ||||
-rw-r--r-- | src/quicktemplates2/qquickapplicationwindow.cpp | 2 | ||||
-rw-r--r-- | src/quicktemplates2/qquickbutton.cpp | 2 | ||||
-rw-r--r-- | src/quicktemplates2/qquickcombobox.cpp | 37 | ||||
-rw-r--r-- | src/quicktemplates2/qquickcontrol.cpp | 4 | ||||
-rw-r--r-- | src/quicktemplates2/qquickitemdelegate.cpp | 2 | ||||
-rw-r--r-- | src/quicktemplates2/qquickmenubar.cpp | 2 | ||||
-rw-r--r-- | src/quicktemplates2/qquickmenuitem.cpp | 2 | ||||
-rw-r--r-- | src/quicktemplates2/qquickoverlay_p.h | 2 | ||||
-rw-r--r-- | src/quicktemplates2/qquickpage.cpp | 2 | ||||
-rw-r--r-- | src/quicktemplates2/qquickpane.cpp | 2 | ||||
-rw-r--r-- | src/quicktemplates2/qquickpopup.cpp | 1 | ||||
-rw-r--r-- | src/quicktemplates2/qquickrangeslider.cpp | 2 | ||||
-rw-r--r-- | src/quicktemplates2/qquickscrollview.cpp | 2 | ||||
-rw-r--r-- | src/quicktemplates2/qquickspinbox.cpp | 2 | ||||
-rw-r--r-- | src/quicktemplates2/qquickstackview.cpp | 2 | ||||
-rw-r--r-- | src/quicktemplates2/qquickswipeview.cpp | 2 | ||||
-rw-r--r-- | src/quicktemplates2/qquicktabbar.cpp | 2 | ||||
-rw-r--r-- | src/quicktemplates2/qquicktoolbutton.cpp | 2 |
19 files changed, 37 insertions, 37 deletions
diff --git a/src/quicktemplates2/qquickabstractbutton.cpp b/src/quicktemplates2/qquickabstractbutton.cpp index 0aa8ec28..983f2651 100644 --- a/src/quicktemplates2/qquickabstractbutton.cpp +++ b/src/quicktemplates2/qquickabstractbutton.cpp @@ -736,7 +736,7 @@ void QQuickAbstractButton::setIndicator(QQuickItem *indicator) \include qquickicon.qdocinc grouped-properties - \sa text, display, {Icons in Qt Quick Controls 2} + \sa text, display, {Icons in Qt Quick Controls} */ QQuickIcon QQuickAbstractButton::icon() const diff --git a/src/quicktemplates2/qquickapplicationwindow.cpp b/src/quicktemplates2/qquickapplicationwindow.cpp index acd98470..0d05bee7 100644 --- a/src/quicktemplates2/qquickapplicationwindow.cpp +++ b/src/quicktemplates2/qquickapplicationwindow.cpp @@ -113,7 +113,7 @@ QT_BEGIN_NAMESPACE attached properties works in any window regardless of its \c id. \sa {Customizing ApplicationWindow}, Overlay, Page, {Container Controls}, - {Focus Management in Qt Quick Controls 2} + {Focus Management in Qt Quick Controls} */ static const QQuickItemPrivate::ChangeTypes ItemChanges = QQuickItemPrivate::Visibility diff --git a/src/quicktemplates2/qquickbutton.cpp b/src/quicktemplates2/qquickbutton.cpp index fbce5225..b4188a95 100644 --- a/src/quicktemplates2/qquickbutton.cpp +++ b/src/quicktemplates2/qquickbutton.cpp @@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE \e Yes, \e No, and \e Help. Button inherits its API from AbstractButton. For instance, you can set - \l {AbstractButton::text}{text}, display an \l {Icons in Qt Quick Controls 2}{icon}, + \l {AbstractButton::text}{text}, display an \l {Icons in Qt Quick Controls}{icon}, and react to \l {AbstractButton::clicked}{clicks} using the AbstractButton API. A button emits the signal \l {AbstractButton::}{clicked()} when it is activated by the user. diff --git a/src/quicktemplates2/qquickcombobox.cpp b/src/quicktemplates2/qquickcombobox.cpp index 71b4eaf1..60526a0a 100644 --- a/src/quicktemplates2/qquickcombobox.cpp +++ b/src/quicktemplates2/qquickcombobox.cpp @@ -90,21 +90,7 @@ QT_BEGIN_NAMESPACE The following example demonstrates appending content to an editable combo box by reacting to the \l accepted signal. - \code - ComboBox { - editable: true - model: ListModel { - id: model - ListElement { text: "Banana" } - ListElement { text: "Apple" } - ListElement { text: "Coconut" } - } - onAccepted: { - if (find(editText) === -1) - model.append({text: editText}) - } - } - \endcode + \snippet qtquickcontrols2-combobox-accepted.qml combobox \section1 ComboBox Model Roles @@ -130,7 +116,7 @@ QT_BEGIN_NAMESPACE \l textRole is not defined, ComboBox is unable to visualize it and throws a \c {ReferenceError: modelData is not defined}. - \sa {Customizing ComboBox}, {Input Controls}, {Focus Management in Qt Quick Controls 2} + \sa {Customizing ComboBox}, {Input Controls}, {Focus Management in Qt Quick Controls} */ /*! @@ -163,9 +149,22 @@ QT_BEGIN_NAMESPACE \qmlsignal void QtQuick.Controls::ComboBox::accepted() This signal is emitted when the \uicontrol Return or \uicontrol Enter key is pressed - on an \l editable combo box. If the confirmed string is not currently in the model, - the \l currentIndex will be set to \c -1 and the \l currentText will be updated - accordingly. + on an \l editable combo box. + + You can handle this signal in order to add the newly entered + item to the model, for example: + + \snippet qtquickcontrols2-combobox-accepted.qml combobox + + Before the signal is emitted, a check is done to see if the string + exists in the model. If it does, \l currentIndex will be set to its index, + and \l currentText to the string itself. + + After the signal has been emitted, and if the first check failed (that is, + the item did not exist), another check will be done to see if the item was + added by the signal handler. If it was, the \l currentIndex and + \l currentText are updated accordingly. Otherwise, they will be set to + \c -1 and \c "", respectively. \note If there is a \l validator set on the combo box, the signal will only be emitted if the input is in an acceptable state. diff --git a/src/quicktemplates2/qquickcontrol.cpp b/src/quicktemplates2/qquickcontrol.cpp index dd954b2b..e156fb57 100644 --- a/src/quicktemplates2/qquickcontrol.cpp +++ b/src/quicktemplates2/qquickcontrol.cpp @@ -1470,9 +1470,9 @@ void QQuickControl::setHovered(bool hovered) Setting this property propagates the value to all child controls that do not have \c hoverEnabled explicitly set. - You can also enable or disable hover effects for all Qt Quick Controls 2 applications + You can also enable or disable hover effects for all Qt Quick Controls applications by setting the \c QT_QUICK_CONTROLS_HOVER_ENABLED \l {Supported Environment Variables - in Qt Quick Controls 2}{environment variable}. + in Qt Quick Controls}{environment variable}. \sa hovered */ diff --git a/src/quicktemplates2/qquickitemdelegate.cpp b/src/quicktemplates2/qquickitemdelegate.cpp index ac409118..8156ab65 100644 --- a/src/quicktemplates2/qquickitemdelegate.cpp +++ b/src/quicktemplates2/qquickitemdelegate.cpp @@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE in various views and controls, such as \l ListView and \l ComboBox. ItemDelegate inherits its API from AbstractButton. For instance, you can set - \l {AbstractButton::text}{text}, display an \l {Icons in Qt Quick Controls 2}{icon}, + \l {AbstractButton::text}{text}, display an \l {Icons in Qt Quick Controls}{icon}, and react to \l {AbstractButton::clicked}{clicks} using the AbstractButton API. \snippet qtquickcontrols2-itemdelegate.qml 1 diff --git a/src/quicktemplates2/qquickmenubar.cpp b/src/quicktemplates2/qquickmenubar.cpp index 6016e70d..1761d999 100644 --- a/src/quicktemplates2/qquickmenubar.cpp +++ b/src/quicktemplates2/qquickmenubar.cpp @@ -73,7 +73,7 @@ QT_BEGIN_NAMESPACE menus in a menu bar can be accessed using \l menuAt(). \sa {Customizing MenuBar}, Menu, MenuBarItem, {Menu Controls}, - {Focus Management in Qt Quick Controls 2} + {Focus Management in Qt Quick Controls} */ QQuickItem *QQuickMenuBarPrivate::beginCreateItem() diff --git a/src/quicktemplates2/qquickmenuitem.cpp b/src/quicktemplates2/qquickmenuitem.cpp index 22fe664a..a7fc63e8 100644 --- a/src/quicktemplates2/qquickmenuitem.cpp +++ b/src/quicktemplates2/qquickmenuitem.cpp @@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE example. MenuItem inherits its API from AbstractButton. For instance, you can set - \l {AbstractButton::text}{text} and \l {Icons in Qt Quick Controls 2}{icon} + \l {AbstractButton::text}{text} and \l {Icons in Qt Quick Controls}{icon} using the AbstractButton API. \code diff --git a/src/quicktemplates2/qquickoverlay_p.h b/src/quicktemplates2/qquickoverlay_p.h index 0d8bccf5..1d238163 100644 --- a/src/quicktemplates2/qquickoverlay_p.h +++ b/src/quicktemplates2/qquickoverlay_p.h @@ -86,7 +86,7 @@ Q_SIGNALS: protected: void itemChange(ItemChange change, const ItemChangeData &data) override; - void geometryChanged(const QRectF &oldGeometry, const QRectF &newGeometry) override; + void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry) override; void mousePressEvent(QMouseEvent *event) override; void mouseMoveEvent(QMouseEvent *event) override; diff --git a/src/quicktemplates2/qquickpage.cpp b/src/quicktemplates2/qquickpage.cpp index cb90ac48..78bae921 100644 --- a/src/quicktemplates2/qquickpage.cpp +++ b/src/quicktemplates2/qquickpage.cpp @@ -83,7 +83,7 @@ QT_BEGIN_NAMESPACE \endqml \sa ApplicationWindow, {Container Controls}, - {Focus Management in Qt Quick Controls 2} + {Focus Management in Qt Quick Controls} */ static const QQuickItemPrivate::ChangeTypes LayoutChanges = QQuickItemPrivate::Geometry | QQuickItemPrivate::Visibility | QQuickItemPrivate::Destroyed diff --git a/src/quicktemplates2/qquickpane.cpp b/src/quicktemplates2/qquickpane.cpp index fd9d2cf0..18c8bd51 100644 --- a/src/quicktemplates2/qquickpane.cpp +++ b/src/quicktemplates2/qquickpane.cpp @@ -120,7 +120,7 @@ QT_BEGIN_NAMESPACE \endcode \sa {Customizing Pane}, {Container Controls}, - {Focus Management in Qt Quick Controls 2}, {Event Handling} + {Focus Management in Qt Quick Controls}, {Event Handling} */ void QQuickPanePrivate::init() diff --git a/src/quicktemplates2/qquickpopup.cpp b/src/quicktemplates2/qquickpopup.cpp index dd7dede6..f0cf1869 100644 --- a/src/quicktemplates2/qquickpopup.cpp +++ b/src/quicktemplates2/qquickpopup.cpp @@ -2582,6 +2582,7 @@ void QQuickPopup::itemChange(QQuickItem::ItemChange change, const QQuickItem::It else d->popupItem->ungrabShortcut(); } + break; default: break; } diff --git a/src/quicktemplates2/qquickrangeslider.cpp b/src/quicktemplates2/qquickrangeslider.cpp index acf4dca3..378ece50 100644 --- a/src/quicktemplates2/qquickrangeslider.cpp +++ b/src/quicktemplates2/qquickrangeslider.cpp @@ -89,7 +89,7 @@ QT_BEGIN_NAMESPACE For a slider that allows the user to select a single value, see \l Slider. \sa {Customizing RangeSlider}, {Input Controls}, - {Focus Management in Qt Quick Controls 2} + {Focus Management in Qt Quick Controls} */ class QQuickRangeSliderNodePrivate : public QObjectPrivate diff --git a/src/quicktemplates2/qquickscrollview.cpp b/src/quicktemplates2/qquickscrollview.cpp index 98bd174e..70390351 100644 --- a/src/quicktemplates2/qquickscrollview.cpp +++ b/src/quicktemplates2/qquickscrollview.cpp @@ -113,7 +113,7 @@ QT_BEGIN_NAMESPACE \snippet qtquickcontrols2-scrollview-interactive.qml file \sa ScrollBar, ScrollIndicator, {Customizing ScrollView}, {Container Controls}, - {Focus Management in Qt Quick Controls 2} + {Focus Management in Qt Quick Controls} */ class QQuickScrollViewPrivate : public QQuickPanePrivate diff --git a/src/quicktemplates2/qquickspinbox.cpp b/src/quicktemplates2/qquickspinbox.cpp index 274929b0..389e5c54 100644 --- a/src/quicktemplates2/qquickspinbox.cpp +++ b/src/quicktemplates2/qquickspinbox.cpp @@ -92,7 +92,7 @@ static const int AUTO_REPEAT_INTERVAL = 100; \snippet qtquickcontrols2-spinbox-double.qml 1 - \sa Tumbler, {Customizing SpinBox}, {Focus Management in Qt Quick Controls 2} + \sa Tumbler, {Customizing SpinBox}, {Focus Management in Qt Quick Controls} */ /*! diff --git a/src/quicktemplates2/qquickstackview.cpp b/src/quicktemplates2/qquickstackview.cpp index 18f65127..b2a95731 100644 --- a/src/quicktemplates2/qquickstackview.cpp +++ b/src/quicktemplates2/qquickstackview.cpp @@ -373,7 +373,7 @@ QT_BEGIN_NAMESPACE \endlist \sa {Customizing StackView}, {Navigation Controls}, {Container Controls}, - {Focus Management in Qt Quick Controls 2} + {Focus Management in Qt Quick Controls} */ QQuickStackView::QQuickStackView(QQuickItem *parent) diff --git a/src/quicktemplates2/qquickswipeview.cpp b/src/quicktemplates2/qquickswipeview.cpp index e6a88b47..3ba4f4d3 100644 --- a/src/quicktemplates2/qquickswipeview.cpp +++ b/src/quicktemplates2/qquickswipeview.cpp @@ -100,7 +100,7 @@ QT_BEGIN_NAMESPACE or using anchors for its children works as expected. \sa TabBar, PageIndicator, {Customizing SwipeView}, {Navigation Controls}, {Container Controls}, - {Focus Management in Qt Quick Controls 2} + {Focus Management in Qt Quick Controls} */ class QQuickSwipeViewPrivate : public QQuickContainerPrivate diff --git a/src/quicktemplates2/qquicktabbar.cpp b/src/quicktemplates2/qquicktabbar.cpp index 745023c3..5a439b4b 100644 --- a/src/quicktemplates2/qquicktabbar.cpp +++ b/src/quicktemplates2/qquicktabbar.cpp @@ -92,7 +92,7 @@ QT_BEGIN_NAMESPACE \snippet qtquickcontrols2-tabbar-flickable.qml 1 \sa TabButton, {Customizing TabBar}, {Navigation Controls}, {Container Controls}, - {Focus Management in Qt Quick Controls 2} + {Focus Management in Qt Quick Controls} */ class QQuickTabBarPrivate : public QQuickContainerPrivate diff --git a/src/quicktemplates2/qquicktoolbutton.cpp b/src/quicktemplates2/qquicktoolbutton.cpp index eb70fbc4..b613e69b 100644 --- a/src/quicktemplates2/qquicktoolbutton.cpp +++ b/src/quicktemplates2/qquicktoolbutton.cpp @@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE \snippet qtquickcontrols2-toolbar.qml 1 ToolButton inherits its API from AbstractButton. For instance, you can set - \l {AbstractButton::text}{text}, display an \l {Icons in Qt Quick Controls 2}{icon}, + \l {AbstractButton::text}{text}, display an \l {Icons in Qt Quick Controls}{icon}, and react to \l {AbstractButton::clicked}{clicks} using the AbstractButton API. \sa ToolBar, {Customizing ToolButton}, {Button Controls} |