summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-02-29 07:56:51 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2016-02-29 07:57:09 +0100
commit6e96c1d6ea3c101f418c3ec95d49999f836ef60c (patch)
tree1858d3bee0e1dde25986b53909a5d055bab839c7
parent1c5f765658432a08ed52523c3a4547ab2b4a58f1 (diff)
parent0f16932a88f9504e9e3de7cd5e88f6030119528c (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7v5.7.0-alpha1
-rw-r--r--dist/changes-5.6.098
-rw-r--r--src/dialogs/plugins.qmltypes294
-rw-r--r--tests/auto/controls/data/tst_menubar.qml100
3 files changed, 489 insertions, 3 deletions
diff --git a/dist/changes-5.6.0 b/dist/changes-5.6.0
new file mode 100644
index 000000000..63a0aec1d
--- /dev/null
+++ b/dist/changes-5.6.0
@@ -0,0 +1,98 @@
+Qt 5.6 introduces many new features and improvements as well as bugfixes
+over the 5.5.x series. 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.6 series is binary compatible with the 5.5.x series.
+Applications compiled for 5.5 will continue to run with 5.6.
+
+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 *
+****************************************************************************
+
+ - General
+ * Added support for a QT_QUICK_CONTROLS_MOBILE environment variable to
+ make the controls behave like mobile controls on platforms that are
+ not automatically detected as mobile platforms
+
+ - ComboBox
+ * [QTBUG-39088] Added inputMethodHints property
+
+ - Menus
+ * [QTBUG-41951] Fixed keyboard navigation in submenus
+ * iOS: let the platform plugin populate edit menus
+
+ - ScrollView
+ * [QTBUG-48044] Fixed interference with ListView transitions
+
+ - SpinBox
+ * Added cursorPosition property
+
+ - TableView
+ * [QTBUG-50416] Fixed dragging of headers with invisible header columns
+
+ - TextArea
+ * [QTBUG-44734] Added editingFinished signal
+
+ - TextField
+ * Added support for the attached EnterKey.type property
+ * [QTBUG-49147] Hid the placeholder text when horizontally center
+ aligned and focused
+
+ - TreeView
+ * Added rootIndex property
+
+****************************************************************************
+* Dialogs *
+****************************************************************************
+
+ - FileDialog
+ * [QTBUG-46477] Fixed potential UI freezes by creating the internal
+ FolderListModel asynchronously when the dialog is first opened
+
+ - Android
+ * [QTBUG-47369] Fixed window decorations' dismiss-on-click behavior
+
+ - Dialog
+ * [QTBUG-49380] Fixed handling of button box width when it has less than
+ two right buttons
+
+****************************************************************************
+* Layouts *
+****************************************************************************
+
+ - General
+ * [QTBUG-41216] Improved distribution when snapping to pixel grid
+
+ - RowLayout, GridLayout
+ * [QTBUG-45152] Fixed to adhere to sibling order of the children
+
+ - StackLayout
+ * Introduced StackLayout
+
+****************************************************************************
+* Styles *
+****************************************************************************
+
+ - iOS
+ * Implemented SliderStyle
+
+ - Edit menus
+ * Allowed styles to provide own edit menu implementations to provide the
+ standard cut/copy/paste actions with the platform style
+
+****************************************************************************
+* Extras *
+****************************************************************************
+
+ - Tumbler
+ * [QTBUG-48680] Added animation interval argument to setCurrentIndexAt()
diff --git a/src/dialogs/plugins.qmltypes b/src/dialogs/plugins.qmltypes
index c59933047..6e21c16f5 100644
--- a/src/dialogs/plugins.qmltypes
+++ b/src/dialogs/plugins.qmltypes
@@ -22,6 +22,300 @@ Module {
"QtQuick.PrivateWidgets 1.1",
"QtQuick.Window 2.2"
]
+
+ Component {
+ name: "QQuickAbstractColorDialog"
+ prototype: "QQuickAbstractDialog"
+ Property { name: "showAlphaChannel"; type: "bool" }
+ Property { name: "color"; type: "QColor" }
+ Property { name: "currentColor"; type: "QColor" }
+ Property { name: "currentHue"; type: "double"; isReadonly: true }
+ Property { name: "currentSaturation"; type: "double"; isReadonly: true }
+ Property { name: "currentLightness"; type: "double"; isReadonly: true }
+ Property { name: "currentAlpha"; type: "double"; isReadonly: true }
+ Signal { name: "selectionAccepted" }
+ Method {
+ name: "setVisible"
+ Parameter { name: "v"; type: "bool" }
+ }
+ Method {
+ name: "setModality"
+ Parameter { name: "m"; type: "Qt::WindowModality" }
+ }
+ Method {
+ name: "setTitle"
+ Parameter { name: "t"; type: "string" }
+ }
+ Method {
+ name: "setColor"
+ Parameter { name: "arg"; type: "QColor" }
+ }
+ Method {
+ name: "setCurrentColor"
+ Parameter { name: "currentColor"; type: "QColor" }
+ }
+ Method {
+ name: "setShowAlphaChannel"
+ Parameter { name: "arg"; type: "bool" }
+ }
+ }
+ Component {
+ name: "QQuickAbstractDialog"
+ prototype: "QObject"
+ Enum {
+ name: "StandardButton"
+ values: {
+ "NoButton": 0,
+ "Ok": 1024,
+ "Save": 2048,
+ "SaveAll": 4096,
+ "Open": 8192,
+ "Yes": 16384,
+ "YesToAll": 32768,
+ "No": 65536,
+ "NoToAll": 131072,
+ "Abort": 262144,
+ "Retry": 524288,
+ "Ignore": 1048576,
+ "Close": 2097152,
+ "Cancel": 4194304,
+ "Discard": 8388608,
+ "Help": 16777216,
+ "Apply": 33554432,
+ "Reset": 67108864,
+ "RestoreDefaults": 134217728,
+ "NButtons": 134217729
+ }
+ }
+ Enum {
+ name: "StandardButtons"
+ values: {
+ "NoButton": 0,
+ "Ok": 1024,
+ "Save": 2048,
+ "SaveAll": 4096,
+ "Open": 8192,
+ "Yes": 16384,
+ "YesToAll": 32768,
+ "No": 65536,
+ "NoToAll": 131072,
+ "Abort": 262144,
+ "Retry": 524288,
+ "Ignore": 1048576,
+ "Close": 2097152,
+ "Cancel": 4194304,
+ "Discard": 8388608,
+ "Help": 16777216,
+ "Apply": 33554432,
+ "Reset": 67108864,
+ "RestoreDefaults": 134217728,
+ "NButtons": 134217729
+ }
+ }
+ Property { name: "visible"; type: "bool" }
+ Property { name: "modality"; type: "Qt::WindowModality" }
+ Property { name: "title"; type: "string" }
+ Property { name: "isWindow"; type: "bool"; isReadonly: true }
+ Property { name: "x"; type: "int" }
+ Property { name: "y"; type: "int" }
+ Property { name: "width"; type: "int" }
+ Property { name: "height"; type: "int" }
+ Property { name: "__maximumDimension"; type: "int"; isReadonly: true }
+ Signal { name: "visibilityChanged" }
+ Signal { name: "geometryChanged" }
+ Signal { name: "accepted" }
+ Signal { name: "rejected" }
+ Method { name: "open" }
+ Method { name: "close" }
+ Method {
+ name: "setX"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Method {
+ name: "setY"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Method {
+ name: "setWidth"
+ Parameter { name: "arg"; type: "int" }
+ }
+ Method {
+ name: "setHeight"
+ Parameter { name: "arg"; type: "int" }
+ }
+ }
+ Component {
+ name: "QQuickAbstractFileDialog"
+ prototype: "QQuickAbstractDialog"
+ Property { name: "selectExisting"; type: "bool" }
+ Property { name: "selectMultiple"; type: "bool" }
+ Property { name: "selectFolder"; type: "bool" }
+ Property { name: "folder"; type: "QUrl" }
+ Property { name: "nameFilters"; type: "QStringList" }
+ Property { name: "selectedNameFilter"; type: "string" }
+ Property { name: "selectedNameFilterExtensions"; type: "QStringList"; isReadonly: true }
+ Property { name: "selectedNameFilterIndex"; type: "int" }
+ Property { name: "fileUrl"; type: "QUrl"; isReadonly: true }
+ Property { name: "fileUrls"; type: "QList<QUrl>"; isReadonly: true }
+ Property { name: "sidebarVisible"; type: "bool" }
+ Signal { name: "filterSelected" }
+ Signal { name: "fileModeChanged" }
+ Signal { name: "selectionAccepted" }
+ Method {
+ name: "setVisible"
+ Parameter { name: "v"; type: "bool" }
+ }
+ Method {
+ name: "setTitle"
+ Parameter { name: "t"; type: "string" }
+ }
+ Method {
+ name: "setSelectExisting"
+ Parameter { name: "s"; type: "bool" }
+ }
+ Method {
+ name: "setSelectMultiple"
+ Parameter { name: "s"; type: "bool" }
+ }
+ Method {
+ name: "setSelectFolder"
+ Parameter { name: "s"; type: "bool" }
+ }
+ Method {
+ name: "setFolder"
+ Parameter { name: "f"; type: "QUrl" }
+ }
+ Method {
+ name: "setNameFilters"
+ Parameter { name: "f"; type: "QStringList" }
+ }
+ Method {
+ name: "selectNameFilter"
+ Parameter { name: "f"; type: "string" }
+ }
+ Method {
+ name: "setSelectedNameFilterIndex"
+ Parameter { name: "idx"; type: "int" }
+ }
+ Method {
+ name: "setSidebarVisible"
+ Parameter { name: "s"; type: "bool" }
+ }
+ }
+ Component {
+ name: "QQuickAbstractFontDialog"
+ prototype: "QQuickAbstractDialog"
+ Property { name: "scalableFonts"; type: "bool" }
+ Property { name: "nonScalableFonts"; type: "bool" }
+ Property { name: "monospacedFonts"; type: "bool" }
+ Property { name: "proportionalFonts"; type: "bool" }
+ Property { name: "font"; type: "QFont" }
+ Property { name: "currentFont"; type: "QFont" }
+ Signal { name: "selectionAccepted" }
+ Method {
+ name: "setVisible"
+ Parameter { name: "v"; type: "bool" }
+ }
+ Method {
+ name: "setModality"
+ Parameter { name: "m"; type: "Qt::WindowModality" }
+ }
+ Method {
+ name: "setTitle"
+ Parameter { name: "t"; type: "string" }
+ }
+ Method {
+ name: "setFont"
+ Parameter { name: "arg"; type: "QFont" }
+ }
+ Method {
+ name: "setCurrentFont"
+ Parameter { name: "arg"; type: "QFont" }
+ }
+ Method {
+ name: "setScalableFonts"
+ Parameter { name: "arg"; type: "bool" }
+ }
+ Method {
+ name: "setNonScalableFonts"
+ Parameter { name: "arg"; type: "bool" }
+ }
+ Method {
+ name: "setMonospacedFonts"
+ Parameter { name: "arg"; type: "bool" }
+ }
+ Method {
+ name: "setProportionalFonts"
+ Parameter { name: "arg"; type: "bool" }
+ }
+ }
+ Component {
+ name: "QQuickAbstractMessageDialog"
+ prototype: "QQuickAbstractDialog"
+ exports: ["QtQuick.PrivateWidgets/QtMessageDialog 1.1"]
+ exportMetaObjectRevisions: [0]
+ Enum {
+ name: "Icon"
+ values: {
+ "NoIcon": 0,
+ "Information": 1,
+ "Warning": 2,
+ "Critical": 3,
+ "Question": 4
+ }
+ }
+ Property { name: "text"; type: "string" }
+ Property { name: "informativeText"; type: "string" }
+ Property { name: "detailedText"; type: "string" }
+ Property { name: "icon"; type: "Icon" }
+ Property { name: "standardIconSource"; type: "QUrl"; isReadonly: true }
+ Property { name: "standardButtons"; type: "QQuickAbstractDialog::StandardButtons" }
+ Property {
+ name: "clickedButton"
+ type: "QQuickAbstractDialog::StandardButton"
+ isReadonly: true
+ }
+ Signal { name: "buttonClicked" }
+ Signal { name: "discard" }
+ Signal { name: "help" }
+ Signal { name: "yes" }
+ Signal { name: "no" }
+ Signal { name: "apply" }
+ Signal { name: "reset" }
+ Method {
+ name: "setVisible"
+ Parameter { name: "v"; type: "bool" }
+ }
+ Method {
+ name: "setTitle"
+ Parameter { name: "arg"; type: "string" }
+ }
+ Method {
+ name: "setText"
+ Parameter { name: "arg"; type: "string" }
+ }
+ Method {
+ name: "setInformativeText"
+ Parameter { name: "arg"; type: "string" }
+ }
+ Method {
+ name: "setDetailedText"
+ Parameter { name: "arg"; type: "string" }
+ }
+ Method {
+ name: "setIcon"
+ Parameter { name: "icon"; type: "Icon" }
+ }
+ Method {
+ name: "setStandardButtons"
+ Parameter { name: "buttons"; type: "StandardButtons" }
+ }
+ Method {
+ name: "click"
+ Parameter { name: "button"; type: "QQuickAbstractDialog::StandardButton" }
+ }
+ }
+
Component {
name: "QQuickColorDialog"
defaultProperty: "contentItem"
diff --git a/tests/auto/controls/data/tst_menubar.qml b/tests/auto/controls/data/tst_menubar.qml
index 4d2ae7fc7..e011746e6 100644
--- a/tests/auto/controls/data/tst_menubar.qml
+++ b/tests/auto/controls/data/tst_menubar.qml
@@ -59,6 +59,8 @@ TestCase {
width:400
height:400
+ readonly property int waitTime: 200
+
Component {
id: windowComponent
ApplicationWindow {
@@ -148,12 +150,104 @@ TestCase {
verify(fileMenu)
tryCompare(fileMenu, "__popupVisible", false)
mousePress(fileMenu.__visualItem)
- wait(200);
+ wait(waitTime);
tryCompare(fileMenu, "__popupVisible", true)
mouseMove(fileMenu.__contentItem, 0, -10)
- wait(200)
+ wait(waitTime)
mouseRelease(fileMenu.__contentItem, 0, -10)
tryCompare(fileMenu, "__popupVisible", true)
- wait(200)
+ wait(waitTime)
+
+ window.destroy();
+ }
+
+ function test_keyNavigation() {
+ if (Qt.platform.os === "osx")
+ skip("MenuBar cannot be reliably tested on OS X")
+
+ var window = windowComponent.createObject()
+ waitForRendering(window.contentItem)
+ var fileMenu = findChild(window, "fileMenu")
+ verify(fileMenu)
+ var editMenu = findChild(window, "editMenu")
+ verify(editMenu)
+
+ // Click menu should open
+ tryCompare(fileMenu, "__popupVisible", false)
+ mouseClick(fileMenu.__visualItem)
+ wait(waitTime)
+ tryCompare(fileMenu, "__popupVisible", true)
+ tryCompare(fileMenu, "__currentIndex", -1)
+ tryCompare(fileMenu.__contentItem, "status", Loader.Ready)
+
+ // Move right
+ tryCompare(editMenu, "__popupVisible", false)
+ keyPress(Qt.Key_Right, Qt.NoModifier, waitTime)
+ keyRelease(Qt.Key_Right, Qt.NoModifier, waitTime)
+ tryCompare(editMenu, "__popupVisible", true)
+ tryCompare(editMenu.__contentItem, "status", Loader.Ready)
+
+ // Move left
+ tryCompare(fileMenu, "__popupVisible", false)
+ keyPress(Qt.Key_Left, Qt.NoModifier, waitTime)
+ keyRelease(Qt.Key_Left, Qt.NoModifier, waitTime)
+ tryCompare(fileMenu, "__popupVisible", true)
+ tryCompare(fileMenu, "__currentIndex", 0)
+ tryCompare(fileMenu.__contentItem, "status", Loader.Ready)
+
+ // Move down
+ var saveMenuItem = findChild(window, "saveMenuItem")
+ verify(saveMenuItem)
+ tryCompare(saveMenuItem.__visualItem.styleData, "selected", false)
+ keyPress(Qt.Key_Down, Qt.NoModifier, waitTime)
+ keyRelease(Qt.Key_Down, Qt.NoModifier, waitTime)
+ tryCompare(fileMenu, "__currentIndex", 1)
+ tryCompare(saveMenuItem.__visualItem.styleData, "selected", true)
+
+ // Move up
+ var recentFilesSubMenu = findChild(window, "recentFilesSubMenu")
+ verify(recentFilesSubMenu)
+ tryCompare(recentFilesSubMenu.__visualItem.styleData, "selected", false)
+ keyPress(Qt.Key_Up, Qt.NoModifier, waitTime)
+ keyRelease(Qt.Key_Up, Qt.NoModifier, waitTime)
+ tryCompare(fileMenu, "__currentIndex", 0)
+ tryCompare(recentFilesSubMenu.__visualItem.styleData, "selected", true)
+
+ // Move right inside sub menu
+ tryCompare(recentFilesSubMenu, "__popupVisible", false)
+ tryCompare(recentFilesSubMenu, "__currentIndex", -1)
+ keyPress(Qt.Key_Right, Qt.NoModifier, waitTime)
+ keyRelease(Qt.Key_Right, Qt.NoModifier, waitTime)
+ tryCompare(recentFilesSubMenu, "__popupVisible", true)
+ tryCompare(recentFilesSubMenu, "__currentIndex", 0)
+ tryCompare(recentFilesSubMenu.__contentItem, "status", Loader.Ready)
+
+ // Move down inside sub menu
+ var recentFile2MenuItem = findChild(window, "recentFile2MenuItem")
+ verify(recentFile2MenuItem)
+ tryCompare(recentFile2MenuItem.__visualItem.styleData, "selected", false)
+ tryCompare(recentFilesSubMenu, "__currentIndex", 0)
+ keyPress(Qt.Key_Down, Qt.NoModifier, waitTime)
+ keyRelease(Qt.Key_Down, Qt.NoModifier, waitTime)
+ tryCompare(recentFilesSubMenu, "__currentIndex", 1)
+ tryCompare(recentFile2MenuItem.__visualItem.styleData, "selected", true)
+
+ // Move up inside sub menu
+ var recentFile1MenuItem = findChild(window, "recentFile1MenuItem")
+ verify(recentFile1MenuItem)
+ tryCompare(recentFile1MenuItem.__visualItem.styleData, "selected", false)
+ tryCompare(recentFilesSubMenu, "__currentIndex", 1)
+ keyPress(Qt.Key_Up, Qt.NoModifier, waitTime)
+ keyRelease(Qt.Key_Up, Qt.NoModifier, waitTime)
+ tryCompare(recentFilesSubMenu, "__currentIndex", 0)
+ tryCompare(recentFile1MenuItem.__visualItem.styleData, "selected", true)
+
+ // Move left out of sub menu
+ keyPress(Qt.Key_Left, Qt.NoModifier, waitTime)
+ keyRelease(Qt.Key_Left, Qt.NoModifier, waitTime)
+ tryCompare(recentFilesSubMenu, "__popupVisible", false)
+ tryCompare(recentFilesSubMenu, "__currentIndex", -1)
+
+ window.destroy()
}
}