aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-11-04 10:21:53 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-11-04 10:21:53 +0100
commita4317a8f2732213d9d804363918e12b39e308ce2 (patch)
tree2630ad88e4ad2ad2b709c71bf67469dd69af5a06
parent9898744e2ea17e805da559faeb677c9f5bbe080f (diff)
parent5c1aa494e95b2945500e3c3e62240dd60e7190d6 (diff)
Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts: .qmake.conf Change-Id: Ibf7cf09570e73ad2f314e9ce7acf1c766ac3f332
-rw-r--r--dist/changes-5.13.225
-rw-r--r--src/imports/templates/doc/src/qtquicktemplates2-qmltypes.qdoc2
-rw-r--r--src/quicktemplates2/qquickcontainer.cpp2
-rw-r--r--src/quicktemplates2/qquickpopup.cpp7
-rw-r--r--tests/auto/controls/data/tst_splitview.qml69
-rw-r--r--tests/auto/qquickpopup/data/closeOnEscapeWithVisiblePopup.qml16
-rw-r--r--tests/auto/qquickpopup/tst_qquickpopup.cpp16
7 files changed, 135 insertions, 2 deletions
diff --git a/dist/changes-5.13.2 b/dist/changes-5.13.2
new file mode 100644
index 00000000..af5214cd
--- /dev/null
+++ b/dist/changes-5.13.2
@@ -0,0 +1,25 @@
+Qt 5.13.2 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.13.0 through 5.13.1.
+
+For more details, refer to the online documentation included in this
+distribution. The documentation is also available online:
+
+https://doc.qt.io/qt-5/index.html
+
+The Qt version 5.13 series is binary compatible with the 5.12.x series.
+Applications compiled for 5.12 will continue to run with 5.13.
+
+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 *
+****************************************************************************
+
+ - QQuickTextArea:
+ * Fixed rendering issue when using TextArea in a ScrollView.
diff --git a/src/imports/templates/doc/src/qtquicktemplates2-qmltypes.qdoc b/src/imports/templates/doc/src/qtquicktemplates2-qmltypes.qdoc
index 1288e937..f93d6a37 100644
--- a/src/imports/templates/doc/src/qtquicktemplates2-qmltypes.qdoc
+++ b/src/imports/templates/doc/src/qtquicktemplates2-qmltypes.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \qmlmodule QtQuick.Templates 2.5
+ \qmlmodule QtQuick.Templates 2.\QtMinorVersion
\title Qt Quick Templates 2 QML Types
\ingroup qmlmodules
\brief Provides QML types for templates (Qt Quick Templates).
diff --git a/src/quicktemplates2/qquickcontainer.cpp b/src/quicktemplates2/qquickcontainer.cpp
index 47aaa1e2..5f38c5b9 100644
--- a/src/quicktemplates2/qquickcontainer.cpp
+++ b/src/quicktemplates2/qquickcontainer.cpp
@@ -383,7 +383,7 @@ void QQuickContainerPrivate::contentData_append(QQmlListProperty<QObject> *prop,
QQuickItem *item = qobject_cast<QQuickItem *>(obj);
if (item) {
if (QQuickItemPrivate::get(item)->isTransparentForPositioner())
- item->setParentItem(effectiveContentItem(p->contentItem));
+ item->setParentItem(effectiveContentItem(q->contentItem()));
else if (p->contentModel->indexOf(item, nullptr) == -1)
q->addItem(item);
} else {
diff --git a/src/quicktemplates2/qquickpopup.cpp b/src/quicktemplates2/qquickpopup.cpp
index f0cf1869..f272c5cf 100644
--- a/src/quicktemplates2/qquickpopup.cpp
+++ b/src/quicktemplates2/qquickpopup.cpp
@@ -2409,6 +2409,13 @@ void QQuickPopup::componentComplete()
d->complete = true;
d->popupItem->componentComplete();
+
+ if (isVisible()) {
+ if (d->closePolicy & QQuickPopup::CloseOnEscape)
+ d->popupItem->grabShortcut();
+ else
+ d->popupItem->ungrabShortcut();
+ }
}
bool QQuickPopup::isComponentComplete() const
diff --git a/tests/auto/controls/data/tst_splitview.qml b/tests/auto/controls/data/tst_splitview.qml
index 76572a00..c125b99e 100644
--- a/tests/auto/controls/data/tst_splitview.qml
+++ b/tests/auto/controls/data/tst_splitview.qml
@@ -146,6 +146,13 @@ TestCase {
implicitWidth: defaultHorizontalHandleWidth
implicitHeight: defaultVerticalHandleHeight
color: "#444"
+
+ Text {
+ text: parent.x + "," + parent.y + " " + parent.width + "x" + parent.height
+ color: "white"
+ anchors.centerIn: parent
+ rotation: 90
+ }
}
}
@@ -834,6 +841,36 @@ TestCase {
}
}
+ Component {
+ id: repeaterSplitViewComponent
+
+ SplitView {
+ anchors.fill: parent
+ handle: handleComponent
+
+ property alias repeater: repeater
+
+ Repeater {
+ id: repeater
+ model: 3
+ delegate: Rectangle {
+ objectName: "rectDelegate" + index
+
+ SplitView.preferredWidth: 25
+
+ color: "#aaff0000"
+
+ Text {
+ text: parent.x + "," + parent.y + " " + parent.width + "x" + parent.height
+ color: "white"
+ rotation: 90
+ anchors.centerIn: parent
+ }
+ }
+ }
+ }
+ }
+
function test_dragHandle_data() {
var splitViewWidth = testCase.width - splitViewMargins * 2
var splitViewHeight = testCase.height - splitViewMargins * 2
@@ -1092,6 +1129,28 @@ TestCase {
{ x: 25 + 100 + defaultHorizontalHandleWidth, y: 0, width: defaultHorizontalHandleWidth, height: splitViewHeight },
{ x: 25 + 100 + defaultHorizontalHandleWidth * 2, y: 0, width: splitViewWidth - 100, height: splitViewHeight }
]
+ },
+ {
+ tag: "repeater",
+ component: repeaterSplitViewComponent,
+ orientation: Qt.Horizontal,
+ fillIndex: 2,
+ handleIndex: 1,
+ newHandlePos: Qt.point(200, testCase.height / 2),
+ expectedGeometriesBeforeDrag: [
+ { x: 0, y: 0, width: 25, height: splitViewHeight },
+ { x: 25, y: 0, width: defaultHorizontalHandleWidth, height: splitViewHeight },
+ { x: 25 + defaultHorizontalHandleWidth, y: 0, width: 25, height: splitViewHeight },
+ { x: 25 * 2 + defaultHorizontalHandleWidth, y: 0, width: defaultHorizontalHandleWidth, height: splitViewHeight },
+ { x: 25 * 2 + defaultHorizontalHandleWidth * 2, y: 0, width: splitViewWidth - 70 , height: splitViewHeight }
+ ],
+ expectedGeometriesAfterDrag: [
+ { x: 0, y: 0, width: 25, height: splitViewHeight },
+ { x: 25, y: 0, width: defaultHorizontalHandleWidth, height: splitViewHeight },
+ { x: 25 + defaultHorizontalHandleWidth, y: 0, width: 105, height: splitViewHeight },
+ { x: 140, y: 0, width: defaultHorizontalHandleWidth, height: splitViewHeight },
+ { x: 150, y: 0, width: 150, height: splitViewHeight }
+ ]
}
]
return data
@@ -1122,6 +1181,7 @@ TestCase {
var targetHandle = handles[data.handleIndex]
mousePress(targetHandle)
verify(control.resizing)
+ // newHandlePos is in scene coordinates, so map it to coordinates local to the handle.
var localPos = testCase.mapToItem(targetHandle, data.newHandlePos.x, data.newHandlePos.y)
mouseMove(targetHandle, localPos.x - targetHandle.width / 2, localPos.y - targetHandle.height / 2)
verify(control.resizing)
@@ -1957,4 +2017,13 @@ TestCase {
// Shouldn't be an assertion failure.
control.visible = false
}
+
+ // QTBUG-79302: ensure that the Repeater's items are actually generated.
+ // test_dragHandle:repeater tests dragging behavior with a Repeater.
+ function test_repeater(data) {
+ var control = createTemporaryObject(repeaterSplitViewComponent, testCase)
+ verify(control)
+ compare(control.repeater.count, 3)
+ compare(control.contentChildren.length, 3)
+ }
}
diff --git a/tests/auto/qquickpopup/data/closeOnEscapeWithVisiblePopup.qml b/tests/auto/qquickpopup/data/closeOnEscapeWithVisiblePopup.qml
new file mode 100644
index 00000000..b9606eb2
--- /dev/null
+++ b/tests/auto/qquickpopup/data/closeOnEscapeWithVisiblePopup.qml
@@ -0,0 +1,16 @@
+import QtQuick 2.13
+import QtQuick.Window 2.13
+import QtQuick.Controls 2.13
+
+Window {
+ width: 400
+ height: 400
+ Popup {
+ objectName: "popup"
+ visible: true
+ width: 200
+ height: 200
+ anchors.centerIn: parent
+ closePolicy: Popup.CloseOnEscape
+ }
+}
diff --git a/tests/auto/qquickpopup/tst_qquickpopup.cpp b/tests/auto/qquickpopup/tst_qquickpopup.cpp
index c36edd6d..7da20c37 100644
--- a/tests/auto/qquickpopup/tst_qquickpopup.cpp
+++ b/tests/auto/qquickpopup/tst_qquickpopup.cpp
@@ -82,6 +82,7 @@ private slots:
void cursorShape();
void componentComplete();
void closeOnEscapeWithNestedPopups();
+ void closeOnEscapeWithVisiblePopup();
void enabled();
void orientation_data();
void orientation();
@@ -1020,6 +1021,21 @@ void tst_QQuickPopup::closeOnEscapeWithNestedPopups()
QCOMPARE(stackView->depth(), 1);
}
+void tst_QQuickPopup::closeOnEscapeWithVisiblePopup()
+{
+ QQuickApplicationHelper helper(this, QStringLiteral("closeOnEscapeWithVisiblePopup.qml"));
+ QQuickWindow *window = helper.window;
+ window->show();
+ QVERIFY(QTest::qWaitForWindowExposed(window));
+
+ QQuickPopup *popup = window->findChild<QQuickPopup *>("popup");
+ QVERIFY(popup);
+ QTRY_VERIFY(popup->isOpened());
+
+ QTest::keyClick(window, Qt::Key_Escape);
+ QTRY_VERIFY(!popup->isVisible());
+}
+
void tst_QQuickPopup::enabled()
{
QQuickPopup popup;