aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-04-16 03:00:59 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-04-16 03:01:00 +0200
commit8b61881469901a793e9ac8eec7caefad547258a2 (patch)
treefc85f58a91776cfe1f57f2cdf7f1267833041eec /src
parentd1fdbd128f6e95255c7d9fc20ef07f44677a649e (diff)
parentced7d5af9caeedd7b3a2278b052a0b0f7bf951b7 (diff)
Merge remote-tracking branch 'origin/5.13' into dev
Diffstat (limited to 'src')
-rw-r--r--src/imports/controls/controls.pro2
-rw-r--r--src/imports/controls/plugins.qmltypes2
-rw-r--r--src/imports/templates/plugins.qmltypes3
-rw-r--r--src/imports/templates/templates.pro2
-rw-r--r--src/quicktemplates2/qquickcombobox.cpp10
-rw-r--r--src/quicktemplates2/qquickpane.cpp16
-rw-r--r--src/quicktemplates2/qquickspinbox.cpp6
-rw-r--r--src/quicktemplates2/qquickstackview.cpp29
8 files changed, 58 insertions, 12 deletions
diff --git a/src/imports/controls/controls.pro b/src/imports/controls/controls.pro
index db0d14ae..2aeaf9ab 100644
--- a/src/imports/controls/controls.pro
+++ b/src/imports/controls/controls.pro
@@ -1,6 +1,6 @@
TARGET = qtquickcontrols2plugin
TARGETPATH = QtQuick/Controls.2
-IMPORT_VERSION = 2.5
+IMPORT_VERSION = 2.$$QT_MINOR_VERSION
QT += qml quick
QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private quickcontrols2-private
diff --git a/src/imports/controls/plugins.qmltypes b/src/imports/controls/plugins.qmltypes
index 26f0251c..9b4610f0 100644
--- a/src/imports/controls/plugins.qmltypes
+++ b/src/imports/controls/plugins.qmltypes
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtQuick.Controls 2.5'
+// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtQuick.Controls 2.13'
Module {
dependencies: [
diff --git a/src/imports/templates/plugins.qmltypes b/src/imports/templates/plugins.qmltypes
index 0922e871..48e23edd 100644
--- a/src/imports/templates/plugins.qmltypes
+++ b/src/imports/templates/plugins.qmltypes
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtQuick.Templates 2.5'
+// 'qmlplugindump -nonrelocatable -dependencies dependencies.json QtQuick.Templates 2.13'
Module {
dependencies: ["QtQuick 2.9", "QtQuick.Window 2.2"]
@@ -1065,7 +1065,6 @@ Module {
prototype: "QObject"
Property { name: "centerIn"; type: "QQuickItem"; isPointer: true }
}
- Component { name: "QQuickPopupItem"; defaultProperty: "contentData"; prototype: "QQuickPage" }
Component {
name: "QQuickProgressBar"
defaultProperty: "data"
diff --git a/src/imports/templates/templates.pro b/src/imports/templates/templates.pro
index b132f47d..3447ef90 100644
--- a/src/imports/templates/templates.pro
+++ b/src/imports/templates/templates.pro
@@ -1,6 +1,6 @@
TARGET = qtquicktemplates2plugin
TARGETPATH = QtQuick/Templates.2
-IMPORT_VERSION = 2.5
+IMPORT_VERSION = 2.$$QT_MINOR_VERSION
QT += qml quick
QT_PRIVATE += core-private gui-private qml-private quick-private quicktemplates2-private
diff --git a/src/quicktemplates2/qquickcombobox.cpp b/src/quicktemplates2/qquickcombobox.cpp
index 09b5e376..0ffd76ab 100644
--- a/src/quicktemplates2/qquickcombobox.cpp
+++ b/src/quicktemplates2/qquickcombobox.cpp
@@ -1556,10 +1556,10 @@ bool QQuickComboBox::eventFilter(QObject *object, QEvent *event)
break;
}
case QEvent::FocusOut:
- if (qGuiApp->focusObject() != this) {
+ if (qGuiApp->focusObject() != this && (!d->popup || !d->popup->hasActiveFocus())) {
// Only close the popup if focus was transferred somewhere else
- // than to the popup button (which normally means that the user
- // clicked on the popup button to open it, not close it.
+ // than to the popup or the popup button (which normally means that
+ // the user clicked on the popup button to open it, not close it).
d->hidePopup(false);
setPressed(false);
}
@@ -1589,9 +1589,9 @@ void QQuickComboBox::focusOutEvent(QFocusEvent *event)
Q_D(QQuickComboBox);
QQuickControl::focusOutEvent(event);
- if (qGuiApp->focusObject() != d->contentItem) {
+ if (qGuiApp->focusObject() != d->contentItem && (!d->popup || !d->popup->hasActiveFocus())) {
// Only close the popup if focus was transferred
- // somewhere else than to the inner line edit (which is
+ // somewhere else than to the popup or the inner line edit (which is
// normally done from QQuickComboBox::focusInEvent).
d->hidePopup(false);
setPressed(false);
diff --git a/src/quicktemplates2/qquickpane.cpp b/src/quicktemplates2/qquickpane.cpp
index 3edbce9d..fd9d2cf0 100644
--- a/src/quicktemplates2/qquickpane.cpp
+++ b/src/quicktemplates2/qquickpane.cpp
@@ -103,6 +103,22 @@ QT_BEGIN_NAMESPACE
}
\endcode
+ If the \l contentItem has no implicit size and only one child, Pane will
+ use the implicit size of that child. For example, in the following code,
+ the Pane will assume the size of the Rectangle:
+
+ \code
+ Pane {
+ Item {
+ Rectangle {
+ implicitWidth: 200
+ implicitHeight: 200
+ color: "salmon"
+ }
+ }
+ }
+ \endcode
+
\sa {Customizing Pane}, {Container Controls},
{Focus Management in Qt Quick Controls 2}, {Event Handling}
*/
diff --git a/src/quicktemplates2/qquickspinbox.cpp b/src/quicktemplates2/qquickspinbox.cpp
index 6af1d8e8..274929b0 100644
--- a/src/quicktemplates2/qquickspinbox.cpp
+++ b/src/quicktemplates2/qquickspinbox.cpp
@@ -362,8 +362,10 @@ void QQuickSpinBoxPrivate::handleMove(const QPointF &point)
QQuickControlPrivate::handleMove(point);
QQuickItem *ui = up->indicator();
QQuickItem *di = down->indicator();
- up->setPressed(ui && ui->isEnabled() && ui->contains(ui->mapFromItem(q, point)));
- down->setPressed(di && di->isEnabled() && di->contains(di->mapFromItem(q, point)));
+ up->setHovered(ui && ui->isEnabled() && ui->contains(ui->mapFromItem(q, point)));
+ up->setPressed(up->isHovered());
+ down->setHovered(di && di->isEnabled() && di->contains(di->mapFromItem(q, point)));
+ down->setPressed(down->isHovered());
bool pressed = up->isPressed() || down->isPressed();
q->setAccessibleProperty("pressed", pressed);
diff --git a/src/quicktemplates2/qquickstackview.cpp b/src/quicktemplates2/qquickstackview.cpp
index 6dae65c8..18f65127 100644
--- a/src/quicktemplates2/qquickstackview.cpp
+++ b/src/quicktemplates2/qquickstackview.cpp
@@ -343,6 +343,35 @@ QT_BEGIN_NAMESPACE
}
\endqml
+ \section1 Size
+
+ StackView does not inherit an implicit size from items that are pushed onto
+ it. This means that using it as the \l {Popup::}{contentItem} of a
+ \l Dialog, for example, will not work as expected:
+
+ \code
+ Dialog {
+ StackView {
+ initialItem: Rectangle {
+ width: 200
+ height: 200
+ color: "salmon"
+ }
+ }
+ }
+ \endcode
+
+ There are several ways to ensure that StackView has a size in this
+ situation:
+
+ \list
+ \li Set \l implicitWidth and \l implicitHeight on the StackView itself.
+ \li Set \l implicitWidth and \l implicitHeight on the \l Rectangle.
+ \li Set \l {Popup::}{contentWidth} and \l {Popup::}{contentHeight} on
+ the Dialog.
+ \li Give the Dialog a size.
+ \endlist
+
\sa {Customizing StackView}, {Navigation Controls}, {Container Controls},
{Focus Management in Qt Quick Controls 2}
*/