summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-01-19 10:03:47 +0100
committerLiang Qi <liang.qi@qt.io>2018-01-19 10:03:47 +0100
commit698a8268f786d74726eb07255df2d26ac2269079 (patch)
tree7f63974c3a13b507166e84459be7b5fc2787d2e1
parent314d1bdf7d56462102639e12d34596cbfd4fce95 (diff)
parenteb048e486daa3644476fdec5b0bd016b1729fc01 (diff)
downloadqtquickcontrols-698a8268f786d74726eb07255df2d26ac2269079.tar.gz
Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts: src/dialogs/qquickabstractfiledialog_p.h tests/auto/controls/data/tst_combobox.qml Change-Id: I62e54d0a2e89d987e05e8dfad6ae6aac1a32cc72
-rw-r--r--dist/changes-5.9.444
-rw-r--r--src/controls/Private/TableViewItemDelegateLoader.qml5
-rw-r--r--src/controls/TreeView.qml22
-rw-r--r--src/controls/doc/src/qtquickcontrols-index.qdoc2
-rw-r--r--src/controls/doc/src/qtquickcontrolsstyles-index.qdoc2
-rw-r--r--src/dialogs/doc/src/qtquickdialogs-index.qdoc2
-rw-r--r--src/dialogs/qquickabstractdialog.cpp2
-rw-r--r--src/dialogs/qquickabstractfiledialog.cpp2
-rw-r--r--src/dialogs/qquickabstractfiledialog_p.h5
-rw-r--r--tests/auto/controls/data/tst_treeview.qml18
10 files changed, 72 insertions, 32 deletions
diff --git a/dist/changes-5.9.4 b/dist/changes-5.9.4
new file mode 100644
index 00000000..350760d9
--- /dev/null
+++ b/dist/changes-5.9.4
@@ -0,0 +1,44 @@
+Qt 5.9.4 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.
+
+****************************************************************************
+* Qt 5.9.4 Changes *
+****************************************************************************
+
+ - [QTBUG-64488] Fixed the Base style resources to get initialized in
+ static builds.
+
+ - Changed the default style name to be selected at runtime instead of
+ compile time. This gives a more accurate mapping, especially on desktop
+ OSes using alternative platform plugins where the Desktop style is not
+ useful.
+
+ - Calendar:
+ * [QTBUG-64068] Fixed a bug when NaN was displayed instead of date.
+
+ - ScrollView:
+ * [QTBUG-64052] Fixed scrollbar handles when there is no content.
+ * [QTBUG-64596] Fixed cyclic tab navigation.
+
+ - TableView:
+ * [QTBUG-62809] Improved scrolling performance by retaining delegate
+ loader source component once the delegate has been loaded.
+
+ - TreeView:
+ * [QTBUG-47243] Changed to allow selecting items by touch.
diff --git a/src/controls/Private/TableViewItemDelegateLoader.qml b/src/controls/Private/TableViewItemDelegateLoader.qml
index 544b08f8..462a2bb4 100644
--- a/src/controls/Private/TableViewItemDelegateLoader.qml
+++ b/src/controls/Private/TableViewItemDelegateLoader.qml
@@ -65,7 +65,9 @@ Loader {
width: __column ? __column.width : 0
height: parent ? parent.height : 0
visible: __column ? __column.visible : false
- sourceComponent: __model === undefined || styleData.row === -1 ? null
+
+ property bool isValid: false
+ sourceComponent: (__model === undefined || !isValid) ? null
: __column && __column.delegate ? __column.delegate : __itemDelegate
// All these properties are internal
@@ -95,5 +97,6 @@ Loader {
readonly property var value: model && model.hasOwnProperty(role) ? model[role] // Qml ListModel and QAbstractItemModel
: modelData && modelData.hasOwnProperty(role) ? modelData[role] // QObjectList / QObject
: modelData != undefined ? modelData : "" // Models without role
+ onRowChanged: if (row !== -1) itemDelegateLoader.isValid = true
}
}
diff --git a/src/controls/TreeView.qml b/src/controls/TreeView.qml
index aa21acc1..6a38acff 100644
--- a/src/controls/TreeView.qml
+++ b/src/controls/TreeView.qml
@@ -118,8 +118,8 @@ BasicTableView {
z: -1
propagateComposedEvents: true
focus: true
- // Note: with boolean preventStealing we are keeping
- // the flickable from eating our mouse press events
+ // If there is not a touchscreen, keep the flickable from eating our mouse drags.
+ // If there is a touchscreen, flicking is possible, but selection can be done only by tapping, not by dragging.
preventStealing: !Settings.hasTouchScreen
property var clickedIndex: undefined
@@ -323,8 +323,22 @@ BasicTableView {
modelAdaptor.collapse(modelIndex)
else
modelAdaptor.expand(modelIndex)
- } else if (root.__activateItemOnSingleClick) {
- root.activated(modelIndex)
+ } else {
+ if (Settings.hasTouchScreen) {
+ // compensate for the fact that onPressed didn't select on press: do it here instead
+ pressedIndex = modelAdaptor.mapRowToModelIndex(clickIndex)
+ pressedColumn = __listView.columnAt(mouseX)
+ selectOnRelease = false
+ __listView.forceActiveFocus()
+ __listView.currentIndex = clickIndex
+ if (!clickedIndex)
+ clickedIndex = pressedIndex
+ mouseSelect(pressedIndex, mouse.modifiers, false)
+ if (!mouse.modifiers)
+ clickedIndex = pressedIndex
+ }
+ if (root.__activateItemOnSingleClick && !mouse.modifiers)
+ root.activated(modelIndex)
}
root.clicked(modelIndex)
}
diff --git a/src/controls/doc/src/qtquickcontrols-index.qdoc b/src/controls/doc/src/qtquickcontrols-index.qdoc
index 2dc7d13b..63753ae1 100644
--- a/src/controls/doc/src/qtquickcontrols-index.qdoc
+++ b/src/controls/doc/src/qtquickcontrols-index.qdoc
@@ -34,7 +34,7 @@
The Qt Quick Controls module provides a set of controls that can be used to
build complete interfaces in Qt Quick.
- The module is new in Qt 5.1.
+ The module was introduced in Qt 5.1.
Visit the \l{Qt Quick Controls Overview} page to get started.
diff --git a/src/controls/doc/src/qtquickcontrolsstyles-index.qdoc b/src/controls/doc/src/qtquickcontrolsstyles-index.qdoc
index 69180295..100868a9 100644
--- a/src/controls/doc/src/qtquickcontrolsstyles-index.qdoc
+++ b/src/controls/doc/src/qtquickcontrolsstyles-index.qdoc
@@ -62,7 +62,7 @@
The Qt Quick Controls Styles submodule allows custom styling for \l {Qt Quick Controls}.
- The submodule is new in Qt 5.1.
+ The submodule was introduced in Qt 5.1.
\section1 Getting started
diff --git a/src/dialogs/doc/src/qtquickdialogs-index.qdoc b/src/dialogs/doc/src/qtquickdialogs-index.qdoc
index 0adf28af..7404dac9 100644
--- a/src/dialogs/doc/src/qtquickdialogs-index.qdoc
+++ b/src/dialogs/doc/src/qtquickdialogs-index.qdoc
@@ -31,7 +31,7 @@
\brief Qt Quick Dialogs submodule
- The module is new in Qt 5.1.
+ The module was introduced in Qt 5.1.
\section1 Dialogs
diff --git a/src/dialogs/qquickabstractdialog.cpp b/src/dialogs/qquickabstractdialog.cpp
index ce87d56c..e00c17a1 100644
--- a/src/dialogs/qquickabstractdialog.cpp
+++ b/src/dialogs/qquickabstractdialog.cpp
@@ -230,7 +230,7 @@ void QQuickAbstractDialog::decorationLoaded()
} else {
qWarning() << m_decorationComponent->url() <<
"cannot be used as a window decoration because it's not an Item";
- delete m_windowDecoration;
+ delete decoration;
delete m_decorationComponent;
m_decorationComponent = 0;
}
diff --git a/src/dialogs/qquickabstractfiledialog.cpp b/src/dialogs/qquickabstractfiledialog.cpp
index b80bf86b..7c4aa394 100644
--- a/src/dialogs/qquickabstractfiledialog.cpp
+++ b/src/dialogs/qquickabstractfiledialog.cpp
@@ -298,8 +298,6 @@ void QQuickAbstractFileDialog::populateShortcuts()
for (const QFileInfo &fi : drives)
addShortcut(fi.absoluteFilePath(), fi.absoluteFilePath(), fi.absoluteFilePath());
#endif
-
- emit shortcutsChanged();
}
QJSValue QQuickAbstractFileDialog::shortcuts()
diff --git a/src/dialogs/qquickabstractfiledialog_p.h b/src/dialogs/qquickabstractfiledialog_p.h
index cb7ac27e..e00db5be 100644
--- a/src/dialogs/qquickabstractfiledialog_p.h
+++ b/src/dialogs/qquickabstractfiledialog_p.h
@@ -75,8 +75,8 @@ class QQuickAbstractFileDialog : public QQuickAbstractDialog
Q_PROPERTY(QList<QUrl> fileUrls READ fileUrls NOTIFY selectionAccepted)
Q_PROPERTY(bool sidebarVisible READ sidebarVisible WRITE setSidebarVisible NOTIFY sidebarVisibleChanged)
Q_PROPERTY(QString defaultSuffix READ defaultSuffix WRITE setDefaultSuffix NOTIFY defaultSuffixChanged)
- Q_PROPERTY(QJSValue shortcuts READ shortcuts NOTIFY shortcutsChanged) // map of QStandardDirectory names to QUrls
- Q_PROPERTY(QJSValue __shortcuts READ __shortcuts NOTIFY shortcutsChanged) // map of details for QML dialog implementations
+ Q_PROPERTY(QJSValue shortcuts READ shortcuts CONSTANT) // map of QStandardDirectory names to QUrls
+ Q_PROPERTY(QJSValue __shortcuts READ __shortcuts CONSTANT) // map of details for QML dialog implementations
public:
QQuickAbstractFileDialog(QObject *parent = 0);
@@ -118,7 +118,6 @@ Q_SIGNALS:
void fileModeChanged();
void selectionAccepted();
void sidebarVisibleChanged();
- void shortcutsChanged();
void defaultSuffixChanged();
protected Q_SLOTS:
diff --git a/tests/auto/controls/data/tst_treeview.qml b/tests/auto/controls/data/tst_treeview.qml
index dad10a6b..b46d4dc2 100644
--- a/tests/auto/controls/data/tst_treeview.qml
+++ b/tests/auto/controls/data/tst_treeview.qml
@@ -114,8 +114,6 @@ Item {
function test_clicked_signals()
{
- if (Settings.hasTouchScreen)
- skip("Fails with touch screens");
var component = Qt.createComponent("treeview/treeview_1.qml")
compare(component.status, Component.Ready)
var tree = component.createObject(container);
@@ -165,8 +163,6 @@ Item {
function test_headerHidden()
{
- if (Settings.hasTouchScreen)
- skip("Fails with touch screens");
var component = Qt.createComponent("treeview/treeview_1.qml")
compare(component.status, Component.Ready)
var tree = component.createObject(container);
@@ -282,8 +278,6 @@ Item {
function test_keys_navigation()
{
- if (Settings.hasTouchScreen)
- skip("Fails with touch screens");
var component = Qt.createComponent("treeview/treeview_2.qml")
compare(component.status, Component.Ready)
var tree = component.createObject(container);
@@ -338,8 +332,6 @@ Item {
function test_selection_singleSelection()
{
- if (Settings.hasTouchScreen)
- skip("Fails with touch screens");
var component = Qt.createComponent("treeview/treeview_1.qml")
compare(component.status, Component.Ready)
var tree = component.createObject(container);
@@ -465,8 +457,6 @@ Item {
function test_selection_multiSelection()
{
- if (Settings.hasTouchScreen)
- skip("Fails with touch screens");
var component = Qt.createComponent("treeview/treeview_1.qml")
compare(component.status, Component.Ready)
var tree = component.createObject(container);
@@ -576,8 +566,6 @@ Item {
function test_selection_extendedSelection()
{
- if (Settings.hasTouchScreen)
- skip("Fails with touch screens");
var component = Qt.createComponent("treeview/treeview_1.qml")
compare(component.status, Component.Ready)
var tree = component.createObject(container);
@@ -664,8 +652,6 @@ Item {
function test_selection_contiguousSelection()
{
- if (Settings.hasTouchScreen)
- skip("Fails with touch screens");
var component = Qt.createComponent("treeview/treeview_1.qml")
compare(component.status, Component.Ready)
var tree = component.createObject(container);
@@ -762,8 +748,6 @@ Item {
function test_indexAt() {
skip("Fails because of bug QTBUG-47523")
- if (Settings.hasTouchScreen)
- skip("Fails with touch screens");
var component = Qt.createComponent("treeview/treeview_1.qml")
compare(component.status, Component.Ready)
var tree = component.createObject(container);
@@ -832,8 +816,6 @@ Item {
function test_QTBUG_46891_selection_collapse_parent()
{
- if (Settings.hasTouchScreen)
- skip("Fails with touch screens");
var component = Qt.createComponent("treeview/treeview_1.qml")
compare(component.status, Component.Ready)
var tree = component.createObject(container);