aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-10-12 11:48:59 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-10-12 11:48:59 +0200
commitb311ed261a1176c52e68bf8b23bd4040ac12c7c0 (patch)
tree8ae99a01cb656d564ac288035516cf5101706a18
parent50576aeb67e1470c9c5d2b52650bede1aa6b5697 (diff)
parent0007db13236fcee4ca90b885a67cc7de0f40836d (diff)
Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts: .qmake.conf src/quicktemplates2/qquickbuttongroup.cpp src/quicktemplates2/qquickoverlay.cpp tests/auto/controls/data/tst_buttongroup.qml Change-Id: Iae23aaf039c6095007966475294e93220dbead84
-rw-r--r--dist/changes-5.9.279
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-groupbox-custom.pngbin3885 -> 3551 bytes
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-groupbox-custom.qml8
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate.qml4
-rw-r--r--src/imports/platform/qquickplatformdialog_p.h2
-rw-r--r--src/imports/platform/qquickplatformmenu.cpp8
-rw-r--r--src/imports/platform/qquickplatformmenubar.cpp6
-rw-r--r--src/imports/platform/qquickplatformmenuitemgroup.cpp8
-rw-r--r--src/quicktemplates2/qquickabstractbutton.cpp12
-rw-r--r--src/quicktemplates2/qquickbuttongroup.cpp8
-rw-r--r--src/quicktemplates2/qquickpopup.cpp4
-rw-r--r--src/quicktemplates2/qquickscrollview.cpp12
-rw-r--r--tests/auto/controls/data/tst_buttongroup.qml32
-rw-r--r--tests/auto/controls/data/tst_combobox.qml2
-rw-r--r--tests/auto/controls/data/tst_scrollview.qml25
-rw-r--r--tests/manual/screenshots/screenshots.qml8
16 files changed, 182 insertions, 36 deletions
diff --git a/dist/changes-5.9.2 b/dist/changes-5.9.2
new file mode 100644
index 00000000..370f77cb
--- /dev/null
+++ b/dist/changes-5.9.2
@@ -0,0 +1,79 @@
+Qt 5.9.2 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.9.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.9 series is binary compatible with the 5.8.x series.
+Applications compiled for 5.8 will continue to run with 5.9.
+
+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 *
+****************************************************************************
+
+ - BusyIndicator:
+ * [QTBUG-61785] Fixed busy indicators to not block touch events.
+
+ - Control:
+ * [QTBUG-63119] Fixed font inheritance in item views.
+
+ - Drawer:
+ * [QTBUG-61581] Fixed multi-touch leaking through modal overlay.
+ * [QTBUG-59652] Fixed non-modal drawer drag/swipe open and close.
+
+ - Menu:
+ * [QTBUG-61608] Fixed press-and-hold support by removing OnReleaseOutside
+ from the default close policy, to avoid closing on release when opened
+ from an onPressAndHold signal handler.
+
+ - Popup:
+ * [QTBUG-61698] Fixed multi-touch leaking through modal overlay
+ * Fixed focus handling for chained popups. When a popup is closed, focus
+ is now restored to the next popup in chain instead of transferring focus
+ to the window content.
+ * [QTBUG-62158] Fixed popups to take Window::contentOrientation into
+ account.
+
+ - PageIndicator:
+ * Fixed interactive page indicators to work on touch.
+ * [QTBUG-61785] Fixed non-interactive page indicators to not block touch
+ events.
+
+ - ScrollIndicator:
+ * [QTBUG-61785] Fixed scroll indicators to not block touch events.
+
+ - SpinBox:
+ * [QTBUG-61426] Fixed to emit valueModified() on long press.
+ * [QTBUG-62508] Fixed initial value validation.
+
+ - StackView:
+ * [QTBUG-62153] Fixed a crash that would occur when pushing new items
+ from a StackView.onRemoved signal handler.
+ * Fixed resolving of the initialItem URL.
+
+ - TextArea:
+ - TextField:
+ * [QTBUG-62854] Improved the Default style.
+
+ - ToolTip:
+ * [QTBUG-60492] Fixed tooltips to not block shortcuts.
+
+ - Tumbler:
+ * [QTBUG-61374] Fixed a regression with currentIndex and currentItem.
+
+****************************************************************************
+* Calendar *
+****************************************************************************
+
+ - MonthGrid:
+ * [QTBUG-61585] Fixed the clicked() signal to be emitted on touch.
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-groupbox-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-groupbox-custom.png
index 29f0a60d..3a585d9f 100644
--- a/src/imports/controls/doc/images/qtquickcontrols2-groupbox-custom.png
+++ b/src/imports/controls/doc/images/qtquickcontrols2-groupbox-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-groupbox-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-groupbox-custom.qml
index feafe263..cdab3e62 100644
--- a/src/imports/controls/doc/snippets/qtquickcontrols2-groupbox-custom.qml
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-groupbox-custom.qml
@@ -42,6 +42,14 @@ GroupBox {
radius: 2
}
+ label: Label {
+ x: control.leftPadding
+ width: control.availableWidth
+ text: control.title
+ color: "#21be2b"
+ elide: Text.ElideRight
+ }
+
Label {
text: qsTr("Content goes here!")
}
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate.qml
index 9eb3d71c..7fa76f13 100644
--- a/src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate.qml
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate.qml
@@ -56,8 +56,8 @@ ListView {
easing.type: Easing.InOutQuad
}
PropertyAction {
- target: swipeDelegate;
- property: "ListView.delayRemove";
+ target: swipeDelegate
+ property: "ListView.delayRemove"
value: false
}
}
diff --git a/src/imports/platform/qquickplatformdialog_p.h b/src/imports/platform/qquickplatformdialog_p.h
index ba4c5d5f..55a54937 100644
--- a/src/imports/platform/qquickplatformdialog_p.h
+++ b/src/imports/platform/qquickplatformdialog_p.h
@@ -72,7 +72,6 @@ class QQuickPlatformDialog : public QObject, public QQmlParserStatus
Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged FINAL)
Q_PROPERTY(int result READ result WRITE setResult NOTIFY resultChanged FINAL)
Q_CLASSINFO("DefaultProperty", "data")
- Q_ENUMS(StandardCode)
public:
explicit QQuickPlatformDialog(QPlatformTheme::DialogType type, QObject *parent = nullptr);
@@ -98,6 +97,7 @@ public:
void setVisible(bool visible);
enum StandardCode { Rejected, Accepted };
+ Q_ENUM(StandardCode)
int result() const;
void setResult(int result);
diff --git a/src/imports/platform/qquickplatformmenu.cpp b/src/imports/platform/qquickplatformmenu.cpp
index fbef8b8d..82adb6c3 100644
--- a/src/imports/platform/qquickplatformmenu.cpp
+++ b/src/imports/platform/qquickplatformmenu.cpp
@@ -153,7 +153,7 @@ QQuickPlatformMenu::~QQuickPlatformMenu()
m_menuBar->removeMenu(this);
if (m_parentMenu)
m_parentMenu->removeMenu(this);
- for (QQuickPlatformMenuItem *item : m_items) {
+ for (QQuickPlatformMenuItem *item : qAsConst(m_items)) {
if (QQuickPlatformMenu *subMenu = item->subMenu())
subMenu->setParentMenu(nullptr);
item->setMenu(nullptr);
@@ -197,7 +197,7 @@ QPlatformMenu * QQuickPlatformMenu::create()
connect(m_handle, &QPlatformMenu::aboutToShow, this, &QQuickPlatformMenu::aboutToShow);
connect(m_handle, &QPlatformMenu::aboutToHide, this, &QQuickPlatformMenu::aboutToHide);
- for (QQuickPlatformMenuItem *item : m_items)
+ for (QQuickPlatformMenuItem *item : qAsConst(m_items))
m_handle->insertMenuItem(item->create(), nullptr);
if (m_menuItem) {
@@ -237,7 +237,7 @@ void QQuickPlatformMenu::sync()
m_systemTrayIcon->handle()->updateMenu(m_handle);
#endif
- for (QQuickPlatformMenuItem *item : m_items)
+ for (QQuickPlatformMenuItem *item : qAsConst(m_items))
item->sync();
}
@@ -637,7 +637,7 @@ void QQuickPlatformMenu::clear()
if (m_items.isEmpty())
return;
- for (QQuickPlatformMenuItem *item : m_items) {
+ for (QQuickPlatformMenuItem *item : qAsConst(m_items)) {
m_data.removeOne(item);
if (m_handle)
m_handle->removeMenuItem(item->handle());
diff --git a/src/imports/platform/qquickplatformmenubar.cpp b/src/imports/platform/qquickplatformmenubar.cpp
index 516bcc3e..4487b9a7 100644
--- a/src/imports/platform/qquickplatformmenubar.cpp
+++ b/src/imports/platform/qquickplatformmenubar.cpp
@@ -117,7 +117,7 @@ QQuickPlatformMenuBar::QQuickPlatformMenuBar(QObject *parent)
QQuickPlatformMenuBar::~QQuickPlatformMenuBar()
{
- for (QQuickPlatformMenu *menu : m_menus)
+ for (QQuickPlatformMenu *menu : qAsConst(m_menus))
menu->setMenuBar(nullptr);
delete m_handle;
m_handle = nullptr;
@@ -235,7 +235,7 @@ void QQuickPlatformMenuBar::clear()
if (m_menus.isEmpty())
return;
- for (QQuickPlatformMenu *menu : m_menus) {
+ for (QQuickPlatformMenu *menu : qAsConst(m_menus)) {
m_data.removeOne(menu);
if (m_handle)
m_handle->removeMenu(menu->handle());
@@ -254,7 +254,7 @@ void QQuickPlatformMenuBar::classBegin()
void QQuickPlatformMenuBar::componentComplete()
{
m_complete = true;
- for (QQuickPlatformMenu *menu : m_menus)
+ for (QQuickPlatformMenu *menu : qAsConst(m_menus))
menu->sync();
if (!m_window)
setWindow(findWindow());
diff --git a/src/imports/platform/qquickplatformmenuitemgroup.cpp b/src/imports/platform/qquickplatformmenuitemgroup.cpp
index af901bb8..f07d0a1b 100644
--- a/src/imports/platform/qquickplatformmenuitemgroup.cpp
+++ b/src/imports/platform/qquickplatformmenuitemgroup.cpp
@@ -164,7 +164,7 @@ void QQuickPlatformMenuItemGroup::setEnabled(bool enabled)
m_enabled = enabled;
emit enabledChanged();
- for (QQuickPlatformMenuItem *item : m_items) {
+ for (QQuickPlatformMenuItem *item : qAsConst(m_items)) {
if (item->m_enabled) {
item->sync();
emit item->enabledChanged();
@@ -193,7 +193,7 @@ void QQuickPlatformMenuItemGroup::setVisible(bool visible)
m_visible = visible;
emit visibleChanged();
- for (QQuickPlatformMenuItem *item : m_items) {
+ for (QQuickPlatformMenuItem *item : qAsConst(m_items)) {
if (item->m_visible) {
item->sync();
emit item->visibleChanged();
@@ -222,7 +222,7 @@ void QQuickPlatformMenuItemGroup::setExclusive(bool exclusive)
m_exclusive = exclusive;
emit exclusiveChanged();
- for (QQuickPlatformMenuItem *item : m_items)
+ for (QQuickPlatformMenuItem *item : qAsConst(m_items))
item->sync();
}
@@ -317,7 +317,7 @@ void QQuickPlatformMenuItemGroup::clear()
if (m_items.isEmpty())
return;
- for (QQuickPlatformMenuItem *item : m_items) {
+ for (QQuickPlatformMenuItem *item : qAsConst(m_items)) {
item->setGroup(nullptr);
disconnect(item, &QQuickPlatformMenuItem::checkedChanged, this, &QQuickPlatformMenuItemGroup::updateCurrent);
disconnect(item, &QQuickPlatformMenuItem::triggered, this, &QQuickPlatformMenuItemGroup::activateItem);
diff --git a/src/quicktemplates2/qquickabstractbutton.cpp b/src/quicktemplates2/qquickabstractbutton.cpp
index 08a59dc0..2100dce2 100644
--- a/src/quicktemplates2/qquickabstractbutton.cpp
+++ b/src/quicktemplates2/qquickabstractbutton.cpp
@@ -124,13 +124,13 @@ static const int AUTO_REPEAT_INTERVAL = 100;
/*!
\qmlsignal QtQuick.Controls::AbstractButton::pressed()
- This signal is emitted when the button is interactively pressed by the user.
+ This signal is emitted when the button is interactively pressed by the user via touch, mouse, or keyboard.
*/
/*!
\qmlsignal QtQuick.Controls::AbstractButton::released()
- This signal is emitted when the button is interactively released by the user.
+ This signal is emitted when the button is interactively released by the user via touch, mouse, or keyboard.
*/
/*!
@@ -144,26 +144,26 @@ static const int AUTO_REPEAT_INTERVAL = 100;
/*!
\qmlsignal QtQuick.Controls::AbstractButton::clicked()
- This signal is emitted when the button is interactively clicked by the user.
+ This signal is emitted when the button is interactively clicked by the user via touch, mouse, or keyboard.
*/
/*!
\since QtQuick.Controls 2.2 (Qt 5.9)
\qmlsignal QtQuick.Controls::AbstractButton::toggled()
- This signal is emitted when a checkable button is interactively toggled by the user.
+ This signal is emitted when a checkable button is interactively toggled by the user via touch, mouse, or keyboard.
*/
/*!
\qmlsignal QtQuick.Controls::AbstractButton::pressAndHold()
- This signal is emitted when the button is interactively pressed and held down by the user.
+ This signal is emitted when the button is interactively pressed and held down by the user via touch or mouse.
*/
/*!
\qmlsignal QtQuick.Controls::AbstractButton::doubleClicked()
- This signal is emitted when the button is interactively double clicked by the user.
+ This signal is emitted when the button is interactively double clicked by the user via touch or mouse.
*/
QQuickAbstractButtonPrivate::QQuickAbstractButtonPrivate()
diff --git a/src/quicktemplates2/qquickbuttongroup.cpp b/src/quicktemplates2/qquickbuttongroup.cpp
index ef35440f..2a1e354c 100644
--- a/src/quicktemplates2/qquickbuttongroup.cpp
+++ b/src/quicktemplates2/qquickbuttongroup.cpp
@@ -154,11 +154,7 @@ class QQuickButtonGroupPrivate : public QObjectPrivate
Q_DECLARE_PUBLIC(QQuickButtonGroup)
public:
- QQuickButtonGroupPrivate()
- : exclusive(true),
- checkedButton(nullptr)
- {
- }
+ QQuickButtonGroupPrivate() : exclusive(true) { }
void clear();
void buttonClicked();
@@ -170,7 +166,7 @@ public:
static void buttons_clear(QQmlListProperty<QQuickAbstractButton> *prop);
bool exclusive;
- QQuickAbstractButton *checkedButton;
+ QPointer<QQuickAbstractButton> checkedButton;
QVector<QQuickAbstractButton*> buttons;
};
diff --git a/src/quicktemplates2/qquickpopup.cpp b/src/quicktemplates2/qquickpopup.cpp
index 4dba5893..95e3d553 100644
--- a/src/quicktemplates2/qquickpopup.cpp
+++ b/src/quicktemplates2/qquickpopup.cpp
@@ -612,8 +612,8 @@ static QQuickItem *createDimmer(QQmlComponent *component, QQuickPopup *popup, QQ
if (component) {
QQmlContext *creationContext = component->creationContext();
if (!creationContext)
- creationContext = qmlContext(parent);
- QQmlContext *context = new QQmlContext(creationContext, parent);
+ creationContext = qmlContext(popup);
+ QQmlContext *context = new QQmlContext(creationContext, popup);
context->setContextObject(popup);
item = qobject_cast<QQuickItem*>(component->beginCreate(context));
}
diff --git a/src/quicktemplates2/qquickscrollview.cpp b/src/quicktemplates2/qquickscrollview.cpp
index c05e4848..fa9a6c3b 100644
--- a/src/quicktemplates2/qquickscrollview.cpp
+++ b/src/quicktemplates2/qquickscrollview.cpp
@@ -205,7 +205,7 @@ bool QQuickScrollViewPrivate::setFlickable(QQuickFlickable *item, bool content)
void QQuickScrollViewPrivate::updateContentWidth()
{
Q_Q(QQuickScrollView);
- if (!flickable)
+ if (!flickable || !componentComplete)
return;
const qreal cw = flickable->contentWidth();
@@ -219,7 +219,7 @@ void QQuickScrollViewPrivate::updateContentWidth()
void QQuickScrollViewPrivate::updateContentHeight()
{
Q_Q(QQuickScrollView);
- if (!flickable)
+ if (!flickable || !componentComplete)
return;
const qreal ch = flickable->contentHeight();
@@ -551,8 +551,14 @@ void QQuickScrollView::componentComplete()
{
Q_D(QQuickScrollView);
QQuickControl::componentComplete();
- if (!d->contentItem)
+ if (!d->contentItem) {
d->ensureFlickable(true);
+ } else {
+ if (d->contentWidth <= 0)
+ d->updateContentWidth();
+ if (d->contentHeight <= 0)
+ d->updateContentHeight();
+ }
}
void QQuickScrollView::contentItemChange(QQuickItem *newItem, QQuickItem *oldItem)
diff --git a/tests/auto/controls/data/tst_buttongroup.qml b/tests/auto/controls/data/tst_buttongroup.qml
index cbbaec5a..7d981dd3 100644
--- a/tests/auto/controls/data/tst_buttongroup.qml
+++ b/tests/auto/controls/data/tst_buttongroup.qml
@@ -402,4 +402,36 @@ TestCase {
compare(button2.checked, true)
compare(group.checkedButton, null)
}
+
+ Component {
+ id: checkedButtonColumn
+ Column {
+ id: column
+ ButtonGroup { buttons: column.children }
+ Repeater {
+ id: repeater
+ delegate: Button {
+ checkable: true
+ text: modelData
+ onClicked: listModel.remove(index)
+ }
+ model: ListModel {
+ id: listModel
+ Component.onCompleted: {
+ for (var i = 0; i < 10; ++i)
+ append({text: i})
+ }
+ }
+ }
+ }
+ }
+
+ function test_checkedButtonDestroyed() {
+ var column = createTemporaryObject(checkedButtonColumn, testCase)
+ verify(column)
+
+ waitForRendering(column)
+ mouseClick(column.children[0])
+ wait(0) // don't crash (QTBUG-62946, QTBUG-63470)
+ }
}
diff --git a/tests/auto/controls/data/tst_combobox.qml b/tests/auto/controls/data/tst_combobox.qml
index bc110de6..7bc78896 100644
--- a/tests/auto/controls/data/tst_combobox.qml
+++ b/tests/auto/controls/data/tst_combobox.qml
@@ -699,7 +699,7 @@ TestCase {
}
function test_mouse() {
- var control = createTemporaryObject(comboBox, testCase, {model: 3})
+ var control = createTemporaryObject(comboBox, testCase, {model: 3, hoverEnabled: false})
verify(control)
var activatedSpy = signalSpy.createObject(control, {target: control, signalName: "activated"})
diff --git a/tests/auto/controls/data/tst_scrollview.qml b/tests/auto/controls/data/tst_scrollview.qml
index c0b1a401..80110b5a 100644
--- a/tests/auto/controls/data/tst_scrollview.qml
+++ b/tests/auto/controls/data/tst_scrollview.qml
@@ -129,6 +129,16 @@ TestCase {
}
}
+ Component {
+ id: scrollableTextArea
+ ScrollView {
+ TextArea {
+ text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas id dignissim ipsum. Nam molestie nisl turpis."
+ wrapMode: TextArea.WordWrap
+ }
+ }
+ }
+
function test_scrollBars() {
var control = createTemporaryObject(scrollView, testCase, {width: 200, height: 200})
verify(control)
@@ -339,4 +349,19 @@ TestCase {
}
compare(horizontal.position, 0.0)
}
+
+ function test_textArea() {
+ // TODO: verify no binding loop warnings (QTBUG-62325)
+ var control = createTemporaryObject(scrollableTextArea, testCase)
+ verify(control)
+
+ var flickable = control.contentItem
+ verify(flickable && flickable.hasOwnProperty("contentX"))
+
+ var textArea = flickable.contentItem.children[0]
+ verify(textArea && textArea.hasOwnProperty("text"))
+
+ compare(control.contentWidth, flickable.contentWidth)
+ compare(control.contentHeight, flickable.contentHeight)
+ }
}
diff --git a/tests/manual/screenshots/screenshots.qml b/tests/manual/screenshots/screenshots.qml
index 126f02e3..2b031dce 100644
--- a/tests/manual/screenshots/screenshots.qml
+++ b/tests/manual/screenshots/screenshots.qml
@@ -61,7 +61,7 @@ ApplicationWindow {
height: Math.max(600, loader.implicitHeight)
property string currentFilePath
- property string lastSavePath
+ property url lastSaveUrl
Shortcut {
sequence: "Ctrl+Q"
@@ -139,8 +139,8 @@ ApplicationWindow {
ToolButton {
text: "Open Last Screenshot"
focusPolicy: Qt.NoFocus
- enabled: lastSavePath.length > 0
- onClicked: Qt.openUrlExternally(lastSavePath)
+ enabled: lastSaveUrl.toString().length > 0
+ onClicked: Qt.openUrlExternally(lastSaveUrl)
}
Item {
@@ -159,7 +159,7 @@ ApplicationWindow {
var savePath = screenshotsDirStr + "/" + snippetsListView.currentItem.baseName + ".png";
if (result.saveToFile(savePath)) {
saveResultToolTip.text = "Successfully saved screenshot to output folder";
- lastSavePath = savePath;
+ lastSaveUrl = screenshotsDir + "/" + snippetsListView.currentItem.baseName + ".png";
} else {
saveResultToolTip.text = "Failed to save screenshot";
}